xoong
Menu · Controls standard
DocsDesignControls standard

Controls standard

One height scale, one radius, one focus ring and the same states for every control. Candidate for the framework: everything here reads --xo-* and the palette tokens.

Scale

Three heights, a few paddings. Mixing them in one toolbar is allowed; mixing them in one row of a form is not.

sm 32px
md 40px · default
lg 48px · touch
TokenValueUsed for
--xo-control-h2.5remDefault height of every control
--xo-control-h-sm / -lg2rem / 3remDense rows and toolbars / touch
--xo-control-px0.9remHorizontal padding
--xo-control-gap0.5remIcon to label, control to control
--xo-control-border--line-strongControl borders, 3:1 against the page
--xo-ring3px solid --ember-deepThe focus ring, everywhere

Buttons

Default
Primary
Danger
Ghost
With icons

Fields

Label above, then the control, then a hint or an error. Same gaps in every form, so columns line up.

A hint under the field.
Enter a valid e-mail.
Options
Choice

Underline tabs for sections and code.

Pills for switching a view in place.

Choose a colour palette

admineditorviewerblocked

Feedback

Info. Something worth knowing.

Saved. Your changes are live.

Careful. This cannot be undone.

Deleted