Looks supply a visual treatment. Append a condition to choose when it applies. They do not manage interaction state or event handlers.
| Class | Effect |
|---|---|
dimmed |
64% opacity |
pressed |
96% scale, disabled under reduced motion |
faded, faded-down |
Zero opacity, with an optional downward shift |
shown |
Visible, opaque, pointer events enabled |
ring, ring-flat, ring-inset |
2px native outline with 2px, 0px or -2px offset |
ring-solid |
2px solid outline in focused-900 with a 2px offset |
ring-shadow, ring-shadow-flat |
Shadow focus ring with an optional 1px gap |
offscreen-block-start, offscreen-block-end, offscreen-inline-start, offscreen-inline-end |
A full translate off one edge; the inline pair mirrors in right-to-left text |
hoverable |
A neutral 300 hover fill, skipped on disabled items |
<button class="btn ring@focus-visible pressed@active" type="button">Save</button>
<label class="input-shell ring-shadow@focus-within shadow-outline-color:focused-900">
Search <input type="search" />
</label> Choose one focus owner. Shadow rings restore a solid Highlight outline in forced
colors. Supply a matching shadow-outline-offset-color: for the gap when the
control uses a surface other than white. Transitions and cursor policy stay on
the element’s base classes.