LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. States & patterns

Micro-interaction

Also called microinteraction or micro animation

A small moment of feedback around a single action, like a heart that bursts when tapped or a copy icon that turns into a checkmark.

import { useState } from 'react';
import { AnimatePresence, motion, useReducedMotion } from 'motion/react';

const COPIED_FOR = 1500; // ms

export function CopyLinkButton({ url }: { url: string }) {
  const [copied, setCopied] = useState(false);
  const reduceMotion = useReducedMotion();
  const hidden = { opacity: 0, scale: reduceMotion ? 1 : 0.5 };

  async function copy() {
    await navigator.clipboard.writeText(url);
    setCopied(true);
    setTimeout(() => setCopied(false), COPIED_FOR);
  }

  return (
    <button
      type='button'
      onClick={copy}
      className='inline-flex items-center gap-2 rounded-lg border px-3 py-2 text-sm font-medium hover:bg-muted'
    >
      <AnimatePresence mode='popLayout' initial={false}>
        <motion.svg
          key={copied ? 'check' : 'copy'}
          initial={hidden}
          animate={{ opacity: 1, scale: 1 }}
          exit={hidden}
          transition={{ type: 'spring', duration: 0.3, bounce: 0.4 }}
          viewBox='0 0 24 24'
          fill='none'
          stroke='currentColor'
          strokeWidth={2}
          strokeLinecap='round'
          strokeLinejoin='round'
          aria-hidden
          className={`size-4 ${copied ? 'text-emerald-600' : ''}`}
        >
          {copied ? (
            <path d='M20 6 9 17l-5-5' />
          ) : (
            <path d='M8 8h12v12H8zM4 16V4h12' />
          )}
        </motion.svg>
      </AnimatePresence>
      {/* aria-live announces "Copied" to screen readers too. */}
      <span aria-live='polite'>{copied ? 'Copied' : 'Copy link'}</span>
    </button>
  );
}
Add micro-interactions to the post actions: the like heart scales from 0.5 to 1.2 to 1 over 450ms while a ring and 8 small particles burst out; the bookmark fills from the bottom up over 350ms; the copy button swaps its icon for a green checkmark with a spring and reads "Copied" for 1.5s before reverting. Announce "Copied" to screen readers and skip the particles when prefers-reduced-motion is set.

Paste into Layerwise or any AI coding tool.

What is Micro-interaction?

A micro-interaction wraps one small task: liking a post, saving an item, copying a link, flipping a switch. It has a trigger (the click), a response (the heart fills, the icon swaps), and often a short message such as "Copied". Done well, it confirms the action without asking for attention.

Use them on frequent actions where people want to know something happened, especially when the result isn’t otherwise visible, like copying to the clipboard or saving to a list. Kept small, they also give a product personality.

Keep them short: most last 150–400ms, and anything people trigger dozens of times a day should stay subtle. Never make people wait for the animation before they can continue, pair visual changes with text or an aria-live message for screen readers, and tone them down for people who prefer reduced motion.

Related terms

All terms

Press feedback

A quick visual response, usually a slight shrink, that shows a button registered the press the moment a finger or mouse button goes down.

Purposeful animation

Animation used only where it helps people notice a change, follow where something went, or understand what just happened.

Hover effect

A visual change, such as a lift, glow, or zoom, that happens when the mouse pointer moves over an element to show it can be clicked.

Toggle switch

An on/off control shaped like a small track with a sliding knob, used for settings that take effect immediately.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
Like
Save
Copy link