Skip to content

Interaction

Affordance

The visual signal that tells you how something can be used. A button looks pressable. A link looks clickable. When affordance is missing, users guess.

SaveLearn more

Without button and link styling, both controls look like static text.

Hover state

The visual change when a cursor moves over an interactive element. Should confirm interactivity through cursor change, color shift, or both. Color alone is not enough.

cursor: default · Hovered

Pair a pointer cursor with a clear surface or motion cue so hover unmistakably signals interactivity.

Focus state

The visible indicator that an element is keyboard-focused. Removing it is an accessibility failure. Replace it with a custom style, never just delete it.

outline: none

Never delete the focus outline without providing a visible custom replacement.

Active state

The visual change when an element is pressed. Without it, buttons feel unresponsive. A small scale or color shift is enough.

transform: scale(0.96) · 0 presses

Press the button in both modes. A slight scale and tone shift makes taps feel immediate.

Disabled state

A non-interactive element. Using opacity alone is unreliable since it can pass or fail contrast checks unpredictably depending on the background. A specific muted token is more predictable.

Submit#ffffff
Submittinted

Opacity blends unpredictably on tinted surfaces; a dedicated muted token stays consistent.

Cursor

The pointer icon that signals what an element does. Pointer means clickable. Default means static. Text means selectable. The wrong cursor breaks the implicit contract.

Buttondefault
Static labelpointer
Editable textnot-allowed

Hover each row in both modes. Matching pointer, default, and text cursors honors user expectations.

Pointer events

Whether an element can receive mouse or touch input. Setting to none makes an element visually present but non-interactive, useful for decorative layers that should not intercept clicks.

Optimistic update

Updating the UI before the server confirms the action. Feels instant. Requires a rollback if the request fails.

Debounce

A delay before firing a function, reset each time it is triggered. Stops a search input making a request on every keystroke. 300ms is a common threshold.

Touch target

The tappable area of an interactive element. The minimum is 44x44px. The visual element can be smaller than the touch target.

Copy to clipboard

A button that copies text. Needs visible confirmation, typically a checkmark for a second or two. Without it, users click it repeatedly thinking it failed.