Interaction Utilities

Add accessible focus treatment, explicit outlines and rings, and reduced-motion-aware pointer feedback.

Interaction utilities enhance an element that already has the correct native or ARIA semantics. They do not turn a div into a button or add keyboard behavior.

Keyboard focus

.focus-ring adds the shared external focus treatment on :focus-visible. .focus-ring-inset draws the same token-driven emphasis inside the element.

Choose focus placement by clipping context

Use the ordinary ring in open space and the inset version where overflow clipping would hide an outer outline. Tab into the controls to compare them.

The inputs are --focus-ring-width, --focus-ring-style, --focus-ring-color, and --focus-ring-offset.

Explicit outlines and rings

Use .outline-thin, .outline, or .outline-thick when an outline is part of the resting visual treatment. .ring-1, .ring-2, and .ring-3 create one-, two-, and three-pixel focus-color rings using box shadow.

Compare outline and ring primitives

Outlines do not consume layout space; rings can layer with borders and radii.

Standard outline
Ring 1
Ring 2
Ring 3

Pointer feedback

.hover-highlight applies the semantic subtle highlight on hover. .active-press scales slightly while active and automatically removes that motion under prefers-reduced-motion: reduce.

Layer state feedback onto semantic controls

Hover and press utilities augment the native button; they do not replace its component styling or disabled behavior.