ResourcesDesign system

Motion

Motion tokens and the moments they drive. UI feedback stays between 120 and 320 ms, data reveals take 600 ms and play once, and everything respects reduced motion.

Motion tokens

Defined on :root in 01-styles.css. 13-motion.css uses them. Values are read live from the stylesheet.

TokenValueWhen to useDemo
--dur-1120msHover, press, colour changes, small toggles
--dur-2180msPage enter, menus, popovers, tab ink, sliding pill
--dur-3240msAccordion, scrim fade, snackbar enter
--dur-4320msSheets, drawers, dialogs, spring confirmations
--dur-data600msCount-up, bar grow, chart draw. Once per page visit
--ease-standardcubic-bezier(.2,.7,.2,1)Default for all UI motion (same as --ease)
--ease-emphasizedcubic-bezier(.16,1,.3,1)Large surfaces entering: drawer, bottom sheet
--ease-deceleratecubic-bezier(0,0,.2,1)Things arriving from off-screen
--ease-acceleratecubic-bezier(.4,0,1,1)Things leaving. Use for exits only
--ease-springcubic-bezier(.34,1.45,.64,1)Small confirmations: badge, check, snackbar. Never for big surfaces

Moments

Every demo uses the app's own keyframes, classes or functions. With reduced motion on, the end state shows at once.

Page entermo-up · --dur-2 · standard
Stagger30 ms apart · max 10 · --dur-2
Outstanding
Rs 12,45,000
Count-upmoCount() · --dur-data · ease-out
Rs 0Rs 25.0 LRs 50.0 LRs 75.0 LRs 1.00 CrJulAugSepOctNovDec
Chart drawstroke-dashoffset · --dur-data
TBB, 30 days from POD. 18% sales tax on freight. WHT 153(1)(b) deducted by the customer.
Accordiongrid-rows 0fr→1fr · --dur-3
Sliding pilltransform + width · --dur-2
Documents
SheettranslateY · --dur-4 · emphasized
POD saved · syncing
Snackbar spring--dur-4 · --ease-spring
INV-2026-00318
Nishat Mills Ltd · Rs 4,86,000
Stampmo-stamp · 560 ms · one per page

Guidelines

150–250 ms for UI

Hovers, menus, tabs and page enter stay in --dur-1…--dur-3. Only sheets and dialogs use 320 ms. Data reveals use 600 ms.

One orchestrated moment per page

The FBR stamp, the POD check or the count-up. Pick one per page and let everything else simply appear.

Never animate layout on scroll

No parallax, no scroll-jacking, no sticky headers that change size. Scrolling moves content, nothing else.

Never leave content hidden at rest

Animations use backwards fill from a visible end state. If JavaScript or motion is off, everything is still there.

Data motion plays once

Counting up and chart drawing run on the first visit to a route, not on every re-render or filter change.

Reduced motion means instant, not missing

Under prefers-reduced-motion the state still changes, with no transition. Looping effects (pulse, map flow) stop.

Exits are quicker than entries

Leave with --ease-accelerate at about two-thirds of the entry duration. Toasts leave in 250 ms.

Springs only for small things

Badges, checks and snackbars can overshoot. Drawers, pages and tables never bounce.

Elevation

--elev-0
--elev-1
--elev-2
--elev-3
--elev-4

0 flush · 1 resting card · 2 raised · 3 hover lift / dragged row · 4 menus, drawers, dialogs, toasts.

Spacing · 4-pt

--space-14px
--space-28px
--space-312px
--space-416px
--space-520px
--space-624px
--space-732px
--space-848px

Layers · z-index

--z-banner15--z-topbar20--z-sidebar30--z-menu60--z-demo70--z-scrim80--z-drawer90--z-modal95--z-toast120--z-popover125--z-tooltip130

Use a token, never a raw number. A new overlay goes in an existing layer. Peek cards and tooltips sit above toasts because they follow the pointer.