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).
The components layer is declared after base and before templates,
utilities and overrides. A rule in a later layer applies over a rule in an
earlier layer, 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 style
each component and its states (is-active, is-copied, is-loading), and
the event handlers in your template add and remove the state classes. 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 are already styled
Bare <button>, <input>, <textarea>, <select>, checkbox and radio are
styled by rules with zero specificity (their selectors are wrapped in
:where()), so a rule with a class selector applies over them 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.
Component pages
- 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).