Components
elements man style/componentsThe component classes are CSS-only families in @layer components. Each is a
bare noun (.card, .callout, .pill, .tab, .terminal), its parts carry
the family prefix (.card-head, .pill-dot, .tab-list), and its variants are
is- modifiers (is-primary, is-active, is-error). See the
naming rule (elements man style).
components sits after base and before templates, utilities and
overrides, so a template's stylesheet, a utility class or your app's CSS
each restyle a component without !important. See
overriding (opens in a new tab) for the full layer order.
CSS-only scope
Everything here is styling applied to markup you write. The classes give
you the finished look and the state hooks (is-active, is-copied,
is-loading), and the event handlers in your template toggle them. The
package carries no JavaScript so that behavior stays in the template, next to
the state it reads. A tab bar is .tab buttons whose onclick sets the
active tab, with e:if on each panel. A copy button is an onclick that writes
to the clipboard and adds is-copied.
Bare elements come first
Before the component classes, remember that bare <button>, <input>,
<textarea>, <select>, checkbox and radio style themselves at zero
specificity (via :where() and the layer order), so any class you add wins with
no !important. To render any element as the design system's button, the
same one <Button> renders, use the .button class:
Example<button>Default chrome</button> <a class="button is-primary" href="/install">Install</a>
See base (opens in a new tab) for the bare-element principle in full.
The families
- button (opens in a new tab):
<button>/.button, intents, sizes, states, button groups, icon-only. - form (opens in a new tab): bare inputs, textarea, select, checkbox, radio, the
.fieldwrapper, and the grid form. - card (opens in a new tab):
.cardwith head/body/foot. - callout (opens in a new tab):
.calloutwith status and accent intents. - pill (opens in a new tab):
.pillwith intents and an optional status dot. - tabs (opens in a new tab):
.tabs/.tab-list/.tab/.tab-panel(you supply the toggle). - native (opens in a new tab): styled
progress,meter, anddetails > summary. - terminal (opens in a new tab): the dark CLI bar, token rows, and inline CLI references (you supply the copy behavior).