Zazz Design Framework
Components

Toggle

Two-state button control backed by a native checkbox or radio input.

A toggle is a <label class="ui-toggle"> wrapping a visually hidden <input> and button content. It shares styling with .ui-button. The checked state displays active button styles using pure CSS.

Use checkbox inputs for independent toggles; use radio inputs with matching name attributes for mutually exclusive choices.

Variants

Loading components…

API

AttributeValues
data-variantprimary, muted, ghost, destructive (omit = default)
data-sizesm, icon, icon-sm

Tokens (--ui-toggle-background, --ui-toggle-radius, etc.) map to --ui-button-* tokens by default.

On this page