edbnedbn/ui
Get Started
WelcomeChoosing a Variant
ChangelogLicense
Components
OverviewButtonAlert DialogPopoverDropdown MenuPull Down MenuSheet
Motion Utilities
Motion ProviderSpring PresetsHooks
0installs
ComponentsBlocksMaps
HomeDocsGet StartedAnimated Vs Static

On this page

Animated vs Static

Every component ships in two flavors. Animated uses motion/react for spring physics. Static uses CSS transitions—no JS animation library required. Same props, same markup. Swap one for the other by changing the import path.

What's the difference?

AnimatedStatic
Animation engineSpring physics (motion/react)CSS transitions
Bundle cost~30KB gzipped (motion lib)~0KB (CSS only)
Enter/exitAnimatePresence, layout morphs@keyframes via tw-animate-css
GestureswhileHover, whileTap, drag:hover, :active pseudo-classes
Reduced motionAuto-respects system + MotionProviderprefers-reduced-motion query

Which one should I use?

If you're already using motion/react for page transitions or hero animations, go Animated. The library is already in your bundle—adding animated components costs almost nothing extra.

If you're building an admin panel, internal tool, or anything where bundle size matters more than bounce, pick Static. You save ~30KB and the components still feel responsive—they just won't have spring physics.

You can mix both. Use animated for the things users interact with most (modals, popovers, navigation), static for data tables and forms nobody lingers on.

Installing

Terminal
npx shadcn@latest add https://ui.edbn.me/r/button.json

Pulls in motion/react if you don't have it. Respects prefers-reduced-motion automatically.

Docs mode toggle

There's a toggle in the sidebar. Switch it to see the install command, code examples, and dependency list for whichever variant you want. No need to mentally translate—docs update to match your choice.

Disabling animation per-component

Animated components accept a disableAnimation prop. Useful when you want the animated variant globally but need to turn it off in specific places:

<Button disableAnimation>
  Skip the spring, keep the API
</Button>

Or wrap your app in MotionProvider with reducedMotion="always" to disable everything at once.

PropTypeDefaultDescription
disableAnimationbooleanfalseSkips motion animations for this instance. Only available on animated variants.

Switching variants

The API is identical. Migration is three lines:

1
Change the import path: @/components/ui/button → @/components/ui/static/button (or reverse)
2
Add/remove motion/react from package.json if this is the last animated component
3
Done. No prop changes, no refactoring.

Keep going

Browse components
MotionProvider docs