Skip to content
Skip design navigation
Etesie Alpha
Loading account
States · Learn

Interaction states

A state needs two visual channels when accessibility calls for them: a state layer changes the component, and focus also draws a ring that identifies where keyboard interaction landed.

Channel 1

State layer

The content color is mixed over the container at a state-specific opacity. Hover, focus, press, and drag become visible without replacing the component's semantic colors.

Channel 2

Focus ring

Keyboard focus also paints Material's secondary-color ring. Its short pulse points to the landing location; reduced-motion removes the pulse while keeping the resting ring.

Published state-layer opacities

StateTokenAmount
Hover--md-sys-state-hover-state-layer-opacity8%
Focus--md-sys-state-focus-state-layer-opacity10%
Pressed--md-sys-state-pressed-state-layer-opacity10%
Dragged--md-sys-state-dragged-state-layer-opacity16%

Disabled is a repaint

Do not lower the opacity of the whole component. Material repaints its container with on-surface at 12% and its content at 38%. Two amounts preserve legibility and hierarchy.

Hooks describe behavior

Prefer native :hover, :focus-visible, :active, and aria-pressed. Use a headless library's documented data-state only when native semantics cannot express the state.

Inspect and copy the state tokens →