LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Motion principles

Anticipation

Also called wind-up or anticipation animation

A small move in the opposite direction just before the main action, like crouching before a jump, so the motion that follows reads clearly.

import { useAnimate, useReducedMotion } from 'motion/react';

// The wind-up: a small step back before the real move.
const WIND_UP = { x: -6, duration: 0.15 };
const FLIGHT = { x: 28, y: -28, duration: 0.35 };

export function SendButton({ onSend }: { onSend: () => void }) {
  const [scope, animate] = useAnimate<HTMLSpanElement>();
  const reduceMotion = useReducedMotion();

  async function send() {
    onSend();
    const plane = scope.current;
    if (reduceMotion) {
      await animate(plane, { opacity: [1, 0.4, 1] }, { duration: 0.3 });
      return;
    }
    await animate(
      plane,
      { x: WIND_UP.x },
      { duration: WIND_UP.duration, ease: 'easeOut' }
    );
    await animate(
      plane,
      { x: FLIGHT.x, y: FLIGHT.y, opacity: 0 },
      { duration: FLIGHT.duration, ease: 'easeIn' }
    );
    // Reset out of sight, then fade back in at the start.
    await animate(plane, { x: 0, y: 0 }, { duration: 0 });
    await animate(plane, { opacity: 1 }, { duration: 0.2 });
  }

  return (
    <button
      type='button'
      onClick={send}
      className='flex items-center gap-2 overflow-hidden rounded-full bg-blue-600 px-5 py-2.5 text-sm font-medium text-white'
    >
      Send
      <span ref={scope} aria-hidden className='inline-block'>
        <svg
          viewBox='0 0 24 24'
          className='size-4 fill-none stroke-current stroke-2'
        >
          <path
            d='M22 2 11 13M22 2l-7 20-4-9-9-4 20-7z'
            strokeLinejoin='round'
          />
        </svg>
      </span>
    </button>
  );
}
When the user taps "Send", make the paper plane icon pull back 6px to the left over 150ms, then fly up and to the right off the button over 350ms with an ease-in curve, and fade back in at its start. Use only a short opacity fade when prefers-reduced-motion is set.

Paste into Layerwise or any AI coding tool.

What is Anticipation?

Anticipation is one of the 12 principles of animation described by Disney animators Frank Thomas and Ollie Johnston. Before a big movement, the object pulls back a little: a ball squashes before it leaps, a card dips before it flies off, an arrow slides left before it shoots right. The short wind-up tells the eye where to look and makes the main move feel powerful.

In interfaces it works best on deliberate, one-off moments: sending a message, launching a rocket on an onboarding screen, dismissing a card, or a playful call-to-action. Keep the wind-up small, around 5 to 10 percent of the travel distance and 100 to 200ms, so it adds energy without making people wait.

Leave it out of everyday responses such as menus and dropdowns, where any backward step feels slow. For a quick CSS version, an easing curve that dips below zero at the start, such as cubic-bezier(0.36, 0, 0.66, -0.56), pulls the element back slightly before it accelerates.

Often confused with

Overshoot easing
Overshoot easing goes past the target at the end and settles back. Anticipation moves backward at the start, before the main motion.

Related terms

All terms

Follow-through

When the main object stops but loose, attached parts keep moving for a moment, swing past, and settle, which makes motion feel physical.

Squash and stretch

Stretching an object along its path when it moves fast and flattening it on impact, so it looks elastic and has weight.

Keyframes

Snapshots that define how an element looks at set points in an animation. The browser fills in the motion between them.

Ease-in

An easing curve that starts slowly and speeds up toward the end, like a car pulling away from a stop.

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
With anticipation
Without