Skip to content
Alea0.1

Foundations

Motion

Every animation in Alea is one of fourteen patterns, built only from the motion tokens. Motion explains what changed: where something came from, where the selection went, that a press was heard. With reduced motion, nothing travels; things still fade.

Patterns

The rest you can try by hand.

Pop pop

Anchored overlays grow out of what opened them, from the side they open on, and shrink away faster than they came.

Used by
Popover, Select, ComboBox, Autocomplete, menus, date pickers, HoverCard, Tooltip, NavigationMenu
Tokens
duration-base in, duration-fast out, scale-from, distance-sm, ease-out / ease-in

Rise rise

Page-level overlays come up a little while the backdrop fades. Toasts rise with a small overshoot and leave to the side.

Used by
Dialog, AlertDialog, CommandPalette, Toast, Tour
Tokens
duration-slow, distance-lg, ease-out; toasts ease-emphasized

Slide slide

Panels come in from their edge and go back the same way.

Used by
Drawer, bottom sheets, the mobile navigation
Tokens
duration-slow in, duration-base out

Stagger stagger

The items of a list that just opened arrive one after another, so the eye reads them top down. Only the first ten wait.

Used by
Options, menu items, command results
Tokens
stagger (24 ms), distance-sm, duration-base

Expand expand

Content opens to its own height, then fades in, so the layout below moves smoothly.

Used by
Accordion, Spoiler, Tree, NavigationMenu panels
Tokens
duration-slow, ease-out

Glide glide

One indicator per group moves to the new item and takes its size, with a slight overshoot. You see where the selection went.

Used by
Tabs, SegmentedControl, ToggleGroup
Tokens
duration-base, ease-emphasized

Hover me

It rises 2 px.

Lift lift

Surfaces you can click rise a little and cast a deeper shadow on hover.

Used by
Interactive Card, Kanban cards, image tiles, FloatButton
Tokens
lift (-2 px), duration-base

Press press

Controls shrink slightly while pressed and spring back, so a tap feels answered.

Used by
Button, IconButton, toggles, tags, pagination, editor tools, bottom navigation
Tokens
scale-press (0.97), duration-instant

Morph morph

An icon turns into its other state instead of swapping: chevrons rotate, checks pop in, the burger becomes a close icon, switches spring.

Used by
Select, Accordion, Tree, Checkbox, Radio, Switch, Rating, Burger, ThemeToggle
Tokens
duration-base, ease-emphasized
tokens.json
theme.css
icons.svg

Tint tint

Hover and selection colors fade in very quickly; fast enough to feel instant, soft enough not to flicker.

Used by
Options, menu items, rows, links, sidebar and navigation links
Tokens
duration-instant

Nudge nudge

A field that turns invalid shakes once, with the error text, so the problem is found without hunting.

Used by
TextField, Select, pickers, TextArea
Tokens
distance-sm, duration-slow

Draw draw

Strokes and bars grow into place: progress, steps and chart lines.

Used by
ProgressBar, Meter, Steps, charts
Tokens
duration-slow / slower, ease-out

Pulse pulse

Something live or new breathes slowly. It stops with reduced motion.

Used by
Badge dot, Avatar status, Indicator
Tokens
1.6 s loop, ease-out

Shimmer shimmer

A sheen sweeps over placeholders while content loads.

Used by
Skeleton
Tokens
1.6 s loop (3 s with reduced motion)

Easings

--alea-motion-ease-out
cubic-bezier(0.16, 1, 0.3, 1)
--alea-motion-ease-in-out
cubic-bezier(0.65, 0, 0.35, 1)
--alea-motion-ease-standard
cubic-bezier(0.2, 0, 0, 1)
--alea-motion-ease-emphasized
cubic-bezier(0.34, 1.56, 0.64, 1)
--alea-motion-ease-in
cubic-bezier(0.4, 0, 1, 1)

Durations, distances and scales

--alea-motion-duration-instant100ms
--alea-motion-duration-fast150ms
--alea-motion-duration-base250ms
--alea-motion-duration-slow400ms
--alea-motion-duration-slower600ms
--alea-motion-distance-sm4px
--alea-motion-distance-md8px
--alea-motion-distance-lg16px
--alea-motion-scale-from0.96
--alea-motion-scale-press0.97
--alea-motion-stagger24ms
--alea-motion-lift-2px

Reduced motion

  • Distances, scales, the lift and the stagger go to zero: overlays and items fade in place, nothing travels across the screen.
  • Slow durations shorten to base; the emphasized curve stops overshooting.
  • Decorative loops stop (pulse, orbs, the indicator ping); the skeleton shimmer slows to 3 s. Spinners keep turning because they tell you something is happening.
  • Nothing important waits for an animation: exits finish under 200 ms, and focus moves at once.

Rules for new components

  • Use a pattern; if none fits, add one here first. Never a one-off keyframe.
  • Enter with ease-out, exit with ease-in and faster than the entrance.
  • Fade from 0.01, not 0, so the first paint counts.
  • Only animate transform and opacity (and height for expand): no layout jank.
  • In Figma, the same patterns are interactive components with Smart Animate on the ease-out curve.