Foundations
States and motion
One focus ring, one way to be disabled, and one thing that moves on its own.
Focus
- There is one focus indicator: a 2px
ringwith a 2px offset. - A text input shows focus with its border color (
ring) and a 1px ring instead. - Never remove the focus ring.
Disabled
- A disabled control is at opacity 0.5 with a not-allowed cursor.
- Say why it cannot be pressed in a tooltip. For that reason a disabled control still receives pointer events.
| Token | Value | Use |
|---|---|---|
| opacity-disabled | 0.5 | Disabled controls. Use with cursor: not-allowed and do not use pointer-events: none (the tooltip that gives the reason must still work). |
Loading
Motion
Short and quiet by default. Transitions are off under prefers-reduced-motion.
- Hover uses
duration-fast. The default transition isduration-base. A large move usesduration-slowwithease-out-expo. - Only the star moves on its own. Don't add breathing dots, blinking marks, shimmering text or borders with a flowing gradient.
- Under reduced motion, transitions and repeating animations are off.
| Token | Value | Use |
|---|---|---|
| duration-fast | 150ms | Hover and color transitions. |
| duration-base | 220ms | Default transition. |
| duration-slow | 400ms | Large movements, such as a tab indicator moving. |
| duration-theme | 350ms | Theme switch (matched to the crossfade overlay, ease-out). Source name $transition-theme. |
| ease-standard | ease | Default easing. |
| ease-out-expo | cubic-bezier(0.22, 1, 0.36, 1) | Movement that glides to a stop (tab indicator, toast entering). |