animui
ComponentsBlocksDocsPackageTry the demo
Introduction
Installation
Theming
Motion
AI guide
Changelog
Button
Action button
Split button
Button group
Floating button group
Expanding button group
Copy button
Icon morphNew
Confirm morph
Theme switcher
Hold to confirm
Swipe actions
Dropdown menu
Context menu
User menu
Input
Textarea
Password field
Password strength
Search field
Expanding search
Inline edit
Number field
Money input
Phone input
Tag input
Mention input
Shortcut recorder
Select
Combobox
Multi-select
Morph select
Chip group
Radio cards
Billing toggle
Checkbox
Radio group
Switch
Segmented control
Slider
Elastic sliderNew
Calendar
Date picker
Date range picker
Time picker
Color picker
Rich text editor
Signature pad
File dropzone
Tabs
Breadcrumb
Pagination
Mega menu morphNewPro
Scroll area
Accordion
Expandable card
Resizable panels
Dialog
Drawer
Bottom sheet
Popover
Hover card
Tooltip
Share accessPro
Alert
Toast
Toast stack
Announcement bar
Cookie consentNew
Progress
Skeleton
Stepper
Countdown
Usage meter
Avatar
Avatar group
Badge
Card
Metric card
Empty state
Line chart
Bar chart
Donut chart
Streamgraph
Brush chart
Waffle chart
Slope chart
Sparkline
Gauge
Activity heatmap
Animated counter
Ridgeline
Treemap
Split barPro
Sunburst
Sankey flow
Funnel chart
Radar chart
Realtime stream
Race bar chart
Data grid
Sortable data table
Tree view
Filter toolbar
Code block
JSON viewer
Timeline
Comment thread
Chat thread
Image compare
Carousel
Card stack
Text reveal
In-view title
Text morph
Text shimmer
What’s new8 new
DocsMotion

Motion

Spring presets, easing and duration tokens, and reduced motion.

Principles

  • Motion explains cause and effect: what opened, what changed, and where it came from.
  • Animate transform and opacity. Nothing resizes in a single frame; widths and heights follow on a spring.
  • Actions repeated many times a minute, like keyboard navigation, do not animate.
  • Every animation keeps working when interrupted and has a reduced motion branch.

Springs

Springs live in components/arc/lib/motion-tokens.ts and come with every animui install.

PresetValuesUse it for
spring.snappyvisualDuration: 0.26, bounce: 0.12Presses, toggles, thumbs, and small indicators.
spring.smoothvisualDuration: 0.4, bounce: 0Panels, height changes, and layout shifts. Never overshoots.
spring.morphvisualDuration: 0.42, bounce: 0.16Shared highlights, shape changes, and widths that follow content.
spring.responsivestiffness: 520, damping: 38Direct manipulation that must track the pointer closely.
spring.gentlestiffness: 340, damping: 34Larger layout changes that should feel calm.

Easing and duration

CSS transitions use the matching variables from the foundation.

TokenUse it for
--ease-standardDefault for UI transitions.
--ease-enterElements arriving on screen.
--ease-springA gentle settle, paired with --duration-spring.
--duration-fast160ms. Hover, color, and small state changes.
--duration-standard240ms. Panels and menus.
--duration-considered480ms. Rare, introductory reveals.

Using the tokens

toggle.tsx
import { motion, useReducedMotion } from "motion/react";import { motionTokens } from "animui/motion"; export function Thumb({ on }: { on: boolean }) {  const reduce = useReducedMotion();  return (    <motion.span      animate={{ x: on ? 20 : 0 }}      transition={reduce ? { duration: 0 } : motionTokens.spring.snappy}    />  );}
card.module.css
.card {  transition: background var(--duration-fast) var(--ease-standard);}

Reduced motion

When someone asks for reduced motion, keep the end state, focus, and feedback, and remove travel, looping, and parallax. A short opacity change is fine. In CSS:

panel.module.css
@media (prefers-reduced-motion: reduce) {  .panel {    transition: opacity var(--duration-fast) var(--ease-standard);  }}
PreviousThemingNextAI guide

On this page

  • Principles
  • Springs
  • Easing and duration
  • Using the tokens
  • Reduced motion