Enhance your frontend development with this definitive collection of UI micro-interaction examples. The focus is on technical mastery and native performance, utilizing modern APIs like CSS Scroll-Driven Animations (SDA) and the Web Animations API (WAAPI). Explore techniques for smooth state management using data-state attributes, and implement high-fidelity 3D effects with properties like transform-style: preserve-3d - all designed to deliver an optimal, performant user experience.
102 UI Micro Interaction Examples
Tilting Diamond Range Slider Effect
demo & codeThis is a Tilting Diamond Range Slider Effect. It tracks user input through a hidden native range element, overlaying a custom graphical interface. Its primary function is to inject physical inertia into a standard digital control. The tooltip mimics mass, lagging behind rapid movements and tilting in the direction of travel.
Interactive Physics-Based Dot Grid
demo & codeThis is an Interactive Physics-Based Dot Grid. It transforms a static matrix of circular DOM elements into a reactive, liquid-like surface. Its function is to provide an engaging, high-end visual toy or background element where the dots elastically pull toward the user’s cursor on hover, and dramatically explode outward with gravity-based physics upon clicking.
Resizing Tab Bar with Anchor Positioning
demo & codeThis is a Resizing Tab Bar with Anchor Positioning. It demonstrates a modern approach to building a horizontally scrollable navigation menu with a sliding “active” indicator. Its function is to provide a highly fluid, decoupled visual highlighter that perfectly tracks the currently selected tab — even when the container is resized or scrolled — without relying on heavy JavaScript coordinate calculations.
Scroll-Driven Glowing Slider
demo & codeThis is a Scroll-Driven Glowing Slider. It completely restyles a standard <input type="range"> into a high-fidelity, glowing interface component. Its primary function is to demonstrate how experimental CSS features (animation-timeline: scroll()) can link native input states directly to complex visual changes — like a dynamically resizing, blurred glowing track — without relying on heavy JavaScript event listeners.
Cutout Gradient Track Range Slider
demo & codeThis is a Cutout Gradient Track Range Slider. It re-styles the native <input type="range"> element to create a unique visual illusion: the thumb appears to carve an invisible “gap” or “halo” into the track beneath it as it slides. Its function is to provide a highly stylized, modern form control that integrates seamlessly over complex photographic backgrounds without requiring heavy SVG masking or extra DOM nodes.
Skeuomorphic Egg Toggle Switch
demo & codeThis is a Skeuomorphic Egg Toggle Switch. It transforms a standard binary input into a playful, highly tactile 3D object resembling an egg sliding in a frying pan. Its function is to inject personality and physical weight into a micro-interaction, replacing flat state changes with an immersive, multi-layered physics simulation entirely rendered in CSS.
Bursting Animated SVG Star Rating
demo & codeThe Bursting Animated SVG Star Rating is an explosive feedback component for user reviews. It replaces standard instantaneous state changes with a multi-layered animation sequence consisting of a ring expansion, radial line “sparks,” and an elastic fill. Its function is to provide high-fidelity tactile validation for user input within forms.
Interactive Vertical Parallax Cursor Navigation
demo & codeThis is an Interactive Vertical Parallax Cursor Navigation. It combines large-scale typography with a dynamic image-reveal system. Its function is to provide an immersive, tactile menu experience for high-end creative portfolios, where the user’s cursor physically “steers” the list and uncovers visual content linked to each item.
Layered Dynamic Card Swiper
demo & codeThis is a Layered Dynamic Card Swiper. It replaces linear carousels with a 3D-stacked deck logic. Its function is to provide a high-fidelity interaction for decision-based interfaces (like discovery or voting), utilizing data attributes to trigger complex spatial transitions between card groups.
Mouse-Reactive Floating Image Gallery
demo & codeThis is a Mouse-Reactive Floating Image Gallery. It places an oversized grid of visual assets behind the viewport, hidden by the overflow. Its function is to provide an immersive, explorative navigation experience where the user’s cursor physically steers the scene across a scattered landscape of content.
Slingshot Elastic Stretch Toggle
demo & codeThe Slingshot Elastic Stretch Toggle is an experimental UI switch that utilizes exaggerated spatial movement to signal state changes. It replaces the standard sliding thumb with a “dual-handle” system that appears to shoot across the viewport using a high-velocity slingshot effect. Its function is to provide an high-energy alternative to traditional toggles, making a simple boolean selection feel like a physical, kinetic event.
Staggered Animated Hamburger Toggle Button
demo & codeThe Staggered Animated Hamburger Toggle Button is a highly refined navigation trigger. It utilizes aria-pressed states to drive complex, multi-stage CSS transitions. Its function is to provide an accessible, tactile entry point for menus, using staggered motion to visually explain the transformation from a “hamburger” to a “close” icon.
Skeuomorphic Retro Casio F-91W Watch
demo & codeThis is a Skeuomorphic Retro Casio F-91W Watch. It is a hyper-realistic, digital-first recreation of the iconic 1989 timepiece. Its function is to demonstrate the power of modern CSS and vanilla JavaScript for high-fidelity modeling, combining 3D depth illusions, custom fonts, and a live clock to create a fully interactive desktop widget.
Animated Striking Checkbox
demo & codeThis is an Animated Striking Checkbox. It transforms a standard checkbox into a highly expressive UI element that physically becomes the strikethrough line for its associated label. Its function is to provide satisfying, immediate feedback for to-do list items, visually linking the action of checking a box to the result of striking out the text.
FLIP Animated Responsive Grid Switcher
demo & codeThis is an Animated FLIP Grid Switcher. It bridges the gap between two distinct visual states — Card and List — by mathematically calculating the delta of motion. The component ensures that interface elements do not simply “jump” during a layout change but glide organically into their new coordinates, maintaining spatial continuity for the user.
GSAP ScrollTrigger List Expansion
demo & codeThis snippet showcases a GSAP ScrollTrigger List Expansion effect. It mimics the native iOS “Notification Center” or “Wallet” card stack behavior. Its function is to condense a long list of items into a compact, layered visual stack, and then fluidly expand them into full, scrollable cards as the user scrolls down the container, creating a highly tactile mobile UI experience.
Interactive Morphing Task List Item
demo & codeThis Interactive Morphing Task List Item is a high-fidelity productivity component. It combines path interpolation with auditory feedback to validate user actions. Its function is to elevate simple “to-do” lists into rewarding, tactile experiences through state-driven motion.
Skeuomorphic 3D Elastic Toggle Switch
demo & codeThis is a Skeuomorphic 3D Elastic Toggle Switch. It utilizes multi-layered shadowing and complex keyframe sequences to mimic a physical sliding component embedded in a technical grid. Its function is to transform a standard checkbox into a high-fidelity micro-interaction that emphasizes physical mass and momentum.
Animated Border Drawing Button
demo & codeThis is an Animated Border Drawing Button. It transforms a standard call-to-action into a multi-stage micro-interaction. Upon hovering over the button, the component triggers a sequential animation where four corner dots appear, followed by four dashed border lines that “draw” themselves around the button’s perimeter, creating a high-end, futuristic feel.
CSS :has() Notification Toggle
demo & codeThis is a CSS :has() Notification Toggle. It provides a fully functional, state-aware UI switch for settings panels without a single line of JavaScript. Its function is to allow the user to toggle a binary state (notifications on/off) and have the entire UI — including icons, labels, and descriptive text — update instantly based purely on the state of a hidden checkbox.
Scroll-Driven Sticky Parallax Header
demo & codeThis is a Scroll-Driven Sticky Parallax Header. It replaces static profile headers with a deeply integrated, cinematic scrolling experience. Its function is to transform a large hero image and avatar into a compact, sticky navigation bar, using native CSS animation-timeline: scroll() to orchestrate complex parallax, scaling, and fading effects without any JavaScript.
Animated Power-Up Button
demo & codeThis is an Animated Power-Up Button. It replaces standard interaction states with a visually rich, multi-layered animation sequence. Upon clicking, the button rotates, and a series of semi-transparent shadow layers stagger-in behind it, creating a “motion blur” or “power-up” trail effect. Its function is to provide highly stylized feedback for high-impact actions.
Sliding Line Hamburger Menu Animation
demo & codeThis is a Sliding Line Hamburger Menu Animation. It reinvents the standard three-bar toggle by using internal pseudo-element sliding instead of simple opacity changes. Its function is to provide a high-end, staggered interaction that signals navigation states with mechanical precision.
Adaptive Morphing Mouse Cursor Trailer
demo & codeThis is an Adaptive Morphing Mouse Cursor Trailer. It replaces or augments the native pointer with a fluid, high-fidelity visual follower that reacts to the underlying DOM content. Its function is to provide immediate, contextual feedback by scaling up and revealing descriptive icons when the user interacts with specific “interactable” elements.
Interactive Feather Reveal 404 Page
demo & codeThis is an Interactive Feather Reveal 404 Page. It utilizes the Canvas 2D API to transform a sterile error screen into a generative digital canvas. The component records user movement to stamp intricate feather-shaped paths that alternate between solid black fills and clipped fragments of external bird photography.
GSAP Magic Hover Areas
demo & codeThis is a GSAP Magic Hover Areas component. It creates an animated, floating background layer that physically tracks the user’s cursor or keyboard focus across different interactive elements on the page. It adds a cohesive, fluid spatial awareness to standard list items and navigation menus.
Animated Star Toggle Switch
demo & codeThis is an Animated Star Toggle Switch. It replaces a standard HTML checkbox with a highly expressive, character-driven micro-interaction. Its function is to provide emotional feedback to a binary choice (like “favorite” or “bookmark”), launching the star into the air where it physically morphs between a sad, grey orb and a happy, bright yellow star.
Interactive Radial Image Carousel
demo & codeThis is an Interactive Radial CSS Image Carousel. It arranges a deck of image cards into a curved, fan-like layout. Its function is to provide an engaging, space-saving gallery interface where hovering over a card gracefully shifts its neighbors away along a circular path, bringing the focused item into clear view without relying on JavaScript math.
Popping Form Controls
demo & codeThis is a Popping Form Controls component. It replaces standard browser checkboxes and radio buttons with highly stylized, interactive versions. Its function is to provide delightful micro-interactions by triggering a localized, physics-based confetti burst whenever an input is successfully checked.
Skeuomorphic Reversi Radio Buttons
demo & codeThis is a Skeuomorphic Reversi Radio Button component. It overrides standard browser inputs to create a tactile, three-dimensional interaction mechanism. Its function is to replace flat state changes with physical motion, animating the selection exactly like a two-sided piece flipping over on a board.
Scroll-Driven Circular Typographic Scramble
demo & codeThis is a Scroll-Driven Circular Typographic Scramble. It utilizes experimental CSS animation-timeline to bind complex trigonometric and geometric transitions directly to the user’s scrollbar. Its function is to create a highly engaging, interactive hero section where chaotic, scattered letters perfectly align into a readable circular sentence as the user scrolls down.
Anchored Glassmorphic Tab Indicator
demo & codeThis is an Anchored Glassmorphic Tab Indicator. It utilizes the cutting-edge CSS Anchor Positioning API to physically tether a floating visual highlight to the currently active or hovered navigation button. Its function is to provide highly fluid, magnetic feedback without relying on complex JavaScript bounding-box calculations.
Trigonometric Radial Popover Menu
demo & codeThis is a Trigonometric Radial Popover Menu. It replaces heavy JavaScript positioning arrays with native CSS mathematics and the HTML Popover API. Its function is to reveal secondary actions in a circular layout on demand, expanding the interactive surface area without permanently cluttering the interface.
Cosmic 3D Galaxy Button
demo & codeThis is a Cosmic 3D Galaxy Button. It replaces a standard solid color hover state with a dynamic, multi-layered particle system. Its function is to serve as a high-impact primary call-to-action, using spatial depth and global page illumination to draw maximum user focus.
Sci-Fi Reticule Play Button
demo & codeThis is a Sci-Fi Reticule Play Button. It replaces static interaction states with an immersive, HUD-like sequence. Its function is to trigger a process (like loading data or initializing an app) while providing real-time visual feedback through an animated percentage counter and expanding SVG geometry.
Animated SVG Alignment Toolbar
demo & codeThis is an Animated SVG Alignment Toolbar. It replaces static UI states with physical motion. Its function is to provide immediate, tactile feedback for spatial arrangement settings (Top, Middle, Bottom) using native form inputs.
Jello Animated Sliding Tab Navigation
demo & codeThis is a Jello Animated Sliding Tab Navigation. It provides top-level categorization and context-aware sub-menus in a single mobile-friendly component. The function is to visually anchor the user’s location within an app while dynamically adapting the global color theme to match the active context.
Morphing Hamburger Floating Action Button
demo & codeThis is a Morphing Hamburger Floating Action Button (FAB). It uses a combination of CSS transitions and keyframe animations to reveal a hidden context menu. Its function is to consolidate multiple secondary actions (Settings, Copy, Share, Delete) into a single, space-saving focal point. The interaction is initiated by a vanilla JavaScript class toggle.
Interactive Download Folder Animation
demo & codeThis is an Interactive Download Folder Animation. It replaces a static download button with a lively, physics-based micro-interaction. Its function is to provide immediate, satisfying visual confirmation of a user action. The effect drops a new document into a stacked folder, triggering a synchronized elastic bounce across multiple UI layers.
Liquid Filling Heart Interaction
demo & codeThis is a Liquid Filling Heart Interaction. It visualizes a “pumping” effect by animating a fluid level inside a heart-shaped container. Its function is to serve as a playful, interactive state indicator — like a “like” button or health bar — that responds to user clicks with a simulated hydraulic fill and a 3D perspective jolt.
Expandable Wallet Payment Card
demo & codeThis is an Expandable Wallet Payment Card. It uses pure CSS to manage complex UI states without JavaScript. Its function is to conceal secondary actions — like selecting a payment method or adding funds — behind a compact primary view showing the balance. The interaction is self-contained, optimizing screen real estate while keeping critical functions one click away.
Hover Image Reveal Custom Cursor
demo & codeThis is a Hover Image Reveal Custom Cursor. It overrides the default pointer with a dynamic element that transforms upon interacting with specific text links. Its function is to provide visual context — revealing associated images — without cluttering the primary layout. The effect creates an engaging reading experience, bridging text and multimedia seamlessly.
Industrial Ember Glow Toggle Switch
demo & codeThis is an Industrial Ember Glow CSS Toggle Switch. It uses layered box-shadow properties and complex radial gradients to simulate a physical, heat-emitting mechanism. Its function is to handle binary states (On/Off) while providing intense visual feedback. The effect relies completely on CSS, bypassing JavaScript to manage its interactive state and idle animations.
Animated Electric Border CSS Card
demo & codeThis is an Animated Electric Border CSS Card. It utilizes an embedded SVG filter to render a dynamic, unstable boundary. Its function is to isolate data and establish a clear focal point. The effect is self-contained and persistent, demanding attention through continuous motion.
Kinetic Arc Jump Pagination
demo & codePagination is often reduced to a blinking light — a teleportation of state. This component rejects that abstraction. It treats the active indicator as a physical object with mass and momentum. By forcing the dot to leap through space to reach its destination, we create a tactile narrative of travel. It transforms a mundane click into a playful, satisfying interaction that mimics the physics of a board game piece.
Micro-Animated SVG Icon Bar
demo & codeStatic icons are dead pixels; they occupy space but offer no soul. We believe that every interaction — no matter how small — is an opportunity to delight. This navigation bar transforms the mundane act of switching tabs into a tactile event. By embedding the animation logic directly into the SVG structure, we create a system that feels organic, responsive, and deeply crafted. It is not just about showing the user where they are; it is about rewarding them for arriving there.
Fluid Morphing List Expansion
demo & codeMost interfaces treat layout changes as abrupt cuts in a film — jarring and disconnected. We reject this. UI should behave like matter, conserving momentum and mass. This component demonstrates the “impossible”: animating a flexbox container from a horizontal row to a vertical column seamlessly. It creates a sense of spatial continuity that makes the application feel not like software, but like a living organism adapting to user intent.
Elastic Animated Star Rating
demo & codeThis Elastic Animated Star Rating component turns a mundane feedback form into a delightful micro-interaction. Instead of simple color changes, the stars spring to life with a satisfying “elastic” pop when clicked. The animation logic handles both filling (bouncing in) and emptying (shrinking away) states, making the interaction feel physically responsive and engaging.
Morphing Liquid Toggle Switch
demo & codeThis Morphing Liquid Toggle Switch takes the standard UI control to a new level of polish. Instead of a rigid circle sliding back and forth, the handle behaves like a viscous fluid. When toggled, it stretches, snaps, and settles into place with a satisfying elastic bounce, creating a delightful tactile experience for the user.
Tectonic Stacked Tooltip Button
demo & codeThis Tectonic Stacked Tooltip creates a sophisticated, industrial-grade micro-interaction. Instead of a simple fade-in, the tooltip constructs itself from multiple sliding “plates” (slabs) that expand outward upon hovering. With its dark aesthetic, noise textures, and precise easing, it fits perfectly into sci-fi games, technical dashboards, or brutalist web designs.
Flip-Disc Mechanical Checkbox
demo & codeThis Flip-Disc Mechanical Checkbox brings the satisfying, tactile physics of old-school airport information boards to the web. Instead of a simple tick, selecting an item triggers a 3D rotation of a mechanical disc, flipping it from a dark, inactive side to a glowing orange active side. This creates a high-contrast, industrial aesthetic perfect for system dashboards or retro-themed interfaces.
Playful Multi-Step Interaction
demo & codeThis Playful Multi-Step Interaction transforms a boring confirmation dialog into a delightful conversation. It guides the user through a short “chat” with a friendly avatar, using smooth animations and instant feedback. This pattern is perfect for onboarding flows, feedback forms, or any interface that benefits from a human touch, proving that standard interactions can be both functional and fun.