Motion System

CSS-first motion primitives with reduced motion support.

Quickstart

  1. Ensure the registry is set up in Installation.
  2. Run the registry command:
npx shadcn@latest add https://gen-ui-eta-two.vercel.app/r/motion

What It Gives You

  • Motion tokens: Standardized durations and easings.
  • AnimatePresence: JS-powered enter/exit animations.
  • Transition: CSS transition wrapper for layout changes.
  • Stagger: Simple staggered animations for lists.
  • Reduced motion: Honors OS preferences by default.

MotionProvider

import { MotionProvider } from "@/components/systems/motion/motion-system"

<MotionProvider>
  <App />
</MotionProvider>

AnimatePresence

import { AnimatePresence } from "@/components/systems/motion/motion-system"

<AnimatePresence present={isOpen} enter="slideInUp" exit="fadeOut">
  <Modal />
</AnimatePresence>

Stagger

import { Stagger } from "@/components/systems/motion/motion-system"

<Stagger staggerDelay={60} animation="fadeIn">
  {items.map((item) => (
    <Card key={item.id} {...item} />
  ))}
</Stagger>

API Reference

PropTypeNotes
MotionProvider.tokensMotionTokensOverride durations/easings
MotionProvider.forceReducedMotionbooleanForce reduced motion
AnimatePresence.presentbooleanEnter/exit toggle
AnimatePresence.enter / exitAnimationPreset | configAnimation preset
Transition.propertiesstring[]CSS properties to transition
Stagger.staggerDelaynumberDelay between items
getAnimationClass(preset, duration) => stringCSS utility class
← Previous: State BoundaryYou reached the end of the docs.