Skip to main content

State

State tokens define how components visually respond to user interaction—such as when they’re disabled or focused. These variables help ensure consistent behavior and styling across all UI elements, and can be easily customized to match your design system.

Disabled state

The disabled state properties are used to make an element appear visually inactive and non-interactive.

Example

input:disabled {
opacity: var(--dwc-disabled-opacity);
cursor: var(--dwc-disabled-cursor);
}

Variables

VariableDefault Value
--dwc-disabled-opacity0.7
--dwc-disabled-cursorvar(--dwc-cursor-disabled)

Focus state

When an component receives focus, a focus ring will be shown around it to indicate its active state. You can customize the ring's appearance using the variables below. These variables are used in conjunction with the component theme focus ring settings.

Variables

VariableDefault Value
--dwc-focus-ring-l45%
--dwc-focus-ring-a0.4
--dwc-focus-ring-width3px