Sabil UI

Search documentation

Search for a command to run...

Motion

Motion Foundation

How things move in Sabil UI. Short, purposeful animation that gives feedback, keeps space consistent and never gets in the way.

Tokens#

Three curves cover almost every case. They override Tailwind's ease-out and ease-in-out, so every component uses them without extra classes.

@theme {  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);     /* enter, exit, feedback */  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* movement on screen */  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);  /* sheets and drawers */}

Tools#

Use CSS for anything predetermined: press, hover, overlays, shimmer. CSS runs off the main thread and stays smooth while the page is busy. Use motion for what CSS cannot do: springs, gestures, exit animations, height auto and shared layout.

npm install motion

Interaction#

State#

Gesture & Overlay#

Scroll & Layout#