Skip to content

Component classes

The component classes are @utility classes shipped by @viamrobotics/tailwind-config. They style native elements, bits-ui triggers in prime-ui (<Dialog.Close class="icon-button">), and markup outside Svelte.

Each example below is static HTML wearing the class list it shows. Hover is not rendered statically, so the tables name the hover change in words.

A bare class is the design-system default. A modifier beside it recolors or changes the fill, as in class="button button-danger button-outline". Utilities written after the class win, so class="button px-4" overrides the padding.

Two kinds of modifier compose. A color sets the family: button-dark is the neutral family at the solid fill, the design system’s dark variant, and button-danger, button-warning, button-success, button-info, and button-pending are the semantic solids. A fill changes how the family paints: button-outline keeps the light background with the family’s border and text, and button-ghost drops the background until hover. button alone is the default: the neutral family at the outline fill. Solid text picks black or white through contrast-color() where the browser supports it, white elsewhere.

Every color modifier in every fill and state. The markup below is the grid, cell for cell.

Default

Outline

Ghost

Disabled

aria-busy

Neutral

Dark

Danger

Warning

Success

Info

Pending

<!-- Neutral -->
<button type="button" class="button">Neutral</button>
<button type="button" class="button button-outline">Neutral</button>
<button type="button" class="button button-ghost">Neutral</button>
<button type="button" class="button" disabled>Neutral</button>
<button type="button" class="button" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Neutral</button>
<!-- Dark -->
<button type="button" class="button button-dark">Dark</button>
<button type="button" class="button button-dark button-outline">Dark</button>
<button type="button" class="button button-dark button-ghost">Dark</button>
<button type="button" class="button button-dark" disabled>Dark</button>
<button type="button" class="button button-dark" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Dark</button>
<!-- Danger -->
<button type="button" class="button button-danger">Danger</button>
<button type="button" class="button button-danger button-outline">Danger</button>
<button type="button" class="button button-danger button-ghost">Danger</button>
<button type="button" class="button button-danger" disabled>Danger</button>
<button type="button" class="button button-danger" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Danger</button>
<!-- Warning -->
<button type="button" class="button button-warning">Warning</button>
<button type="button" class="button button-warning button-outline">Warning</button>
<button type="button" class="button button-warning button-ghost">Warning</button>
<button type="button" class="button button-warning" disabled>Warning</button>
<button type="button" class="button button-warning" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Warning</button>
<!-- Success -->
<button type="button" class="button button-success">Success</button>
<button type="button" class="button button-success button-outline">Success</button>
<button type="button" class="button button-success button-ghost">Success</button>
<button type="button" class="button button-success" disabled>Success</button>
<button type="button" class="button button-success" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Success</button>
<!-- Info -->
<button type="button" class="button button-info">Info</button>
<button type="button" class="button button-info button-outline">Info</button>
<button type="button" class="button button-info button-ghost">Info</button>
<button type="button" class="button button-info" disabled>Info</button>
<button type="button" class="button button-info" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Info</button>
<!-- Pending -->
<button type="button" class="button button-pending">Pending</button>
<button type="button" class="button button-pending button-outline">Pending</button>
<button type="button" class="button button-pending button-ghost">Pending</button>
<button type="button" class="button button-pending" disabled>Pending</button>
<button type="button" class="button button-pending" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Pending</button>
State Attribute What changes
Disabled :disabled or [aria-disabled="true"] Disabled colors and a not-allowed cursor, with no hover.
Busy [aria-busy="true"] The cursor becomes progress.

button-compact tightens the gap and padding and sets text-xs, for dense panels.

<button type="button" class="button button-compact">Compact</button>

button-xs is the size of a toggle button item: a 24px minimum height, a 4px gap, and text-xs. Use it for a button that sits in a control row beside a toggle group. It composes with the color and fill modifiers.

<button type="button" class="button button-xs">Extra small</button>

button-group on a wrapper joins its direct children into one segmented control. The children are usually buttons, and any bordered child joins the same way. Neighbors share a single border and only the outer corners round. An enabled button stacks above a disabled one so the borders beside a disabled button stay visible. A hovered or focused button draws above its neighbors, so its border and focus ring are never covered. It works with every color, fill, and size modifier. Neighbors of the same solid fill show no divider, because the border is the fill color. Give the wrapper role="group" and an aria-label.

<div class="button-group" role="group" aria-label="Time range">
<button type="button" class="button">Day</button>
<button type="button" class="button">Week</button>
<button type="button" class="button">Month</button>
</div>

A leading icon is an inline <svg> placed as the first child.

<button type="button" class="button button-dark">
<svg aria-hidden="true" class="size-4" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M8 3v10M3 8h10" /></svg>
Add machine
</button>

The busy button sets aria-busy="true" and puts a progress-dots span first.

<button type="button" class="button" aria-busy="true">
<span class="progress-dots" aria-hidden="true"></span>
Saving
</button>

It takes the same button-* color and fill modifiers. icon-button alone is the neutral ghost, icon-button button-outline is the bordered treatment, and icon-button button-danger button-ghost tints the glyph.

Default

Outline

Ghost

Disabled

aria-busy

Neutral

Dark

Danger

Warning

Success

Info

Pending

<!-- Neutral -->
<button type="button" class="icon-button" aria-label="Neutral Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-outline" aria-label="Neutral Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-ghost" aria-label="Neutral Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button" aria-label="Neutral Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button" aria-label="Neutral aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Dark -->
<button type="button" class="icon-button button-dark" aria-label="Dark Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-dark button-outline" aria-label="Dark Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-dark button-ghost" aria-label="Dark Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-dark" aria-label="Dark Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-dark" aria-label="Dark aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Danger -->
<button type="button" class="icon-button button-danger" aria-label="Danger Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-danger button-outline" aria-label="Danger Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-danger button-ghost" aria-label="Danger Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-danger" aria-label="Danger Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-danger" aria-label="Danger aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Warning -->
<button type="button" class="icon-button button-warning" aria-label="Warning Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-warning button-outline" aria-label="Warning Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-warning button-ghost" aria-label="Warning Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-warning" aria-label="Warning Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-warning" aria-label="Warning aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Success -->
<button type="button" class="icon-button button-success" aria-label="Success Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-success button-outline" aria-label="Success Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-success button-ghost" aria-label="Success Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-success" aria-label="Success Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-success" aria-label="Success aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Info -->
<button type="button" class="icon-button button-info" aria-label="Info Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-info button-outline" aria-label="Info Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-info button-ghost" aria-label="Info Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-info" aria-label="Info Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-info" aria-label="Info aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
<!-- Pending -->
<button type="button" class="icon-button button-pending" aria-label="Pending Default"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-pending button-outline" aria-label="Pending Outline"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-pending button-ghost" aria-label="Pending Ghost"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-pending" aria-label="Pending Disabled" disabled><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<button type="button" class="icon-button button-pending" aria-label="Pending aria-busy" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span></button>
State Attribute What changes
Disabled :disabled or [aria-disabled="true"] Gray icon, not-allowed cursor, no hover.
Busy [aria-busy="true"] The cursor becomes progress.

A strip of compact, boxed tabs, like an editor’s file tabs. file-tabs is the strip, one 35px row that scrolls sideways and never wraps, and file-tab is one tab in it. The selected tab carries a line on top and drops its bottom border, so it joins the content below. Hover darkens an enabled, unselected tab, and keyboard focus draws an inset ring, because the strip’s scroll container clips anything drawn outside a tab.

<div class="file-tabs" role="tablist" aria-label="Open files">
<div class="file-tab" role="tab" aria-selected="false">main.ts</div>
<div class="file-tab" role="tab" aria-selected="true">config.json</div>
<div class="file-tab" role="tab" aria-selected="false" aria-disabled="true">README.md</div>
</div>
State Attribute What changes
Hover :hover A medium background and default text, on an enabled tab.
Selected [aria-selected="true"] A dark top line, no bottom border, a white fill, bold text.
Disabled [aria-disabled="true"] Subtle text and a not-allowed cursor, with no hover.
Focus :focus-visible An inset 2px outline.

Modifiers: badge-success, badge-warning, badge-danger, badge-pending, and badge-neutral. A badge is static and reads no attributes.

InactiveOnlineDegradedOfflineIn reviewInfo
<span class="badge">Inactive</span>
<span class="badge badge-success">Online</span>
<span class="badge badge-warning">Degraded</span>
<span class="badge badge-danger">Offline</span>
<span class="badge badge-pending">In review</span>
<span class="badge badge-neutral">Info</span>

Modifiers: banner-info, banner-success, banner-warning, banner-danger, banner-pending, and banner-block. A banner reads no attributes, so give it a role of status or alert. A banner-title inside switches it from the compact one-liner to the stacked layout.

Every tone in the compact and the stacked layout, then banner-block, banner-progress, and banner-details.

Info

Success

Warning

Danger

Pending

banner-block

banner-progress

banner-details

<!-- Info -->
<div class="banner banner-info" role="status">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-description">A new version of viam-server is ready to install.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<div class="banner banner-info" role="status">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Update available</p>
<p class="banner-description">A new version of viam-server is ready to install.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- Success -->
<div class="banner banner-success" role="status">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-description">Your machine picked up the new configuration.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<div class="banner banner-success" role="status">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Changes saved</p>
<p class="banner-description">Your machine picked up the new configuration.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- Warning -->
<div class="banner banner-warning" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-description">my-camera uses a module that is no longer maintained.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<div class="banner banner-warning" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Module deprecated</p>
<p class="banner-description">my-camera uses a module that is no longer maintained.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- Danger -->
<div class="banner banner-danger" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-description">The machine has not checked in for ten minutes.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<div class="banner banner-danger" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Machine offline</p>
<p class="banner-description">The machine has not checked in for ten minutes.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- Pending -->
<div class="banner banner-pending" role="status">
<span class="banner-chip" aria-hidden="true"><span class="progress-dots"></span></span>
<p class="banner-description">Sending the configuration to three machines.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<div class="banner banner-pending" role="status">
<span class="banner-chip" aria-hidden="true"><span class="progress-dots"></span></span>
<p class="banner-title">Deploying</p>
<p class="banner-description">Sending the configuration to three machines.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- banner-block -->
<div class="banner banner-warning banner-block" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Module deprecated</p>
<p class="banner-description">my-camera uses a module that is no longer maintained.</p>
<div class="banner-actions"><button type="button" class="button">Review</button></div>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
</div>
<!-- banner-progress -->
<div class="banner banner-info" role="status">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-description">A new version of viam-server is ready to install.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<div class="progress banner-progress" role="progressbar" aria-label="Time until dismissed" aria-valuemin="0" aria-valuemax="100" aria-valuenow="60"><div class="progress-fill" style="width: 60%"></div></div>
</div>
<!-- banner-details -->
<div class="banner banner-danger" role="alert">
<span class="banner-chip" aria-hidden="true"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></span>
<p class="banner-title">Machine offline</p>
<p class="banner-description">The machine has not checked in for ten minutes.</p>
<button type="button" class="icon-button banner-close" aria-label="Dismiss"><svg aria-hidden="true" class="size-4" viewBox="0 0 24 24" fill="currentColor"><path d="..." /></svg></button>
<div class="banner-details"><p class="font-roboto-mono text-xs text-subtle-1">last seen 14:02:11, exit code 137</p></div>
</div>

An 8px state dot. Bare status-dot is the neutral gray dot. The modifiers status-dot-info, status-dot-warning, status-dot-success, status-dot-danger, and status-dot-disabled set its color, and status-dot-hollow clears the fill and keeps the ring, with or without a state. A direct progress-dots child replaces the dot with the spinner in the dot’s color on the same 8px box, so a state change never shifts layout.

<span class="status-dot" role="img" aria-label="Unknown"></span>
<span class="status-dot status-dot-success" role="img" aria-label="Success"></span>
<span class="status-dot status-dot-danger status-dot-hollow" role="img" aria-label="Danger, hollow"></span>
<span class="status-dot status-dot-info" role="img" aria-label="Connecting">
<span class="progress-dots" aria-hidden="true"></span>
</span>

The dot reads no attributes.

Modifier: pill-outline. A removable pill holds a button child with an accessible name.

LionTiger

Lion

Disabled

Read only

On a plain <span>, aria-disabled and aria-readonly are CSS hooks only. Assistive technology reads no state from them, so a removable pill signals its state through the remove button’s own disabled attribute.

<span class="pill">Lion</span>
<span class="pill pill-outline">Tiger</span>
<span class="pill">
Lion
<button type="button" aria-label="Remove Lion">×</button>
</span>
<span class="pill" aria-disabled="true">Disabled</span>
<span class="pill" aria-readonly="true">Read only</span>
State Attribute What changes
Disabled [aria-disabled="true"] Disabled colors and a not-allowed cursor.
Read only [aria-readonly="true"] Disabled colors, with the default cursor.

pill-outline reads the same two attributes, and a disabled removable pill disables its button.

Outline disabledOutline read only

Disabled

<span class="pill pill-outline" aria-disabled="true">Outline disabled</span>
<span class="pill pill-outline" aria-readonly="true">Outline read only</span>
<span class="pill" aria-disabled="true">
Disabled
<button type="button" aria-label="Remove Disabled" disabled>×</button>
</span>

A keyboard key hint. It is static, so it has no states.

KEsc
<kbd class="kbd">K</kbd>
<kbd class="kbd">Esc</kbd>

Inside an enabled solid button, a kbd takes the button’s label color for its text and border. The solid buttons are button-dark, button-danger, button-warning, button-success, button-info, and button-pending. In an outline or ghost button, or a disabled one, it keeps its subtle text and medium border.

Every color modifier in every fill and state, each with a kbd inside. Switch the theme to check both.

Default

Outline

Ghost

Disabled

aria-busy

Neutral

Dark

Danger

Warning

Success

Info

Pending

<!-- Neutral -->
<button type="button" class="button">Neutral <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-outline">Neutral <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-ghost">Neutral <kbd class="kbd">K</kbd></button>
<button type="button" class="button" disabled>Neutral <kbd class="kbd">K</kbd></button>
<button type="button" class="button" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Neutral <kbd class="kbd">K</kbd></button>
<!-- Dark -->
<button type="button" class="button button-dark">Dark <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-dark button-outline">Dark <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-dark button-ghost">Dark <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-dark" disabled>Dark <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-dark" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Dark <kbd class="kbd">K</kbd></button>
<!-- Danger -->
<button type="button" class="button button-danger">Danger <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-danger button-outline">Danger <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-danger button-ghost">Danger <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-danger" disabled>Danger <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-danger" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Danger <kbd class="kbd">K</kbd></button>
<!-- Warning -->
<button type="button" class="button button-warning">Warning <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-warning button-outline">Warning <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-warning button-ghost">Warning <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-warning" disabled>Warning <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-warning" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Warning <kbd class="kbd">K</kbd></button>
<!-- Success -->
<button type="button" class="button button-success">Success <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-success button-outline">Success <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-success button-ghost">Success <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-success" disabled>Success <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-success" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Success <kbd class="kbd">K</kbd></button>
<!-- Info -->
<button type="button" class="button button-info">Info <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-info button-outline">Info <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-info button-ghost">Info <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-info" disabled>Info <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-info" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Info <kbd class="kbd">K</kbd></button>
<!-- Pending -->
<button type="button" class="button button-pending">Pending <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-pending button-outline">Pending <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-pending button-ghost">Pending <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-pending" disabled>Pending <kbd class="kbd">K</kbd></button>
<button type="button" class="button button-pending" aria-busy="true"><span class="progress-dots" aria-hidden="true"></span>Pending <kbd class="kbd">K</kbd></button>

Initials are the content. An <img> child fills the circle.

al

<span class="avatar" role="img" aria-label="Ada Lovelace">al</span>
<span class="avatar" role="img" aria-label="Grace Hopper">
<img alt="" src="/grace.jpg" />
</span>

The avatar has no states.

A braille spinner. It freezes on its first frame under prefers-reduced-motion: reduce.

Loading
<span class="progress-dots" role="status"><span class="sr-only">Loading</span></span>

progress-dots has no states.

A bar with a progress-fill child. It reads aria-valuenow, and when the attribute is absent the bar is indeterminate and the fill slides, except under prefers-reduced-motion: reduce. Set the determinate width on the fill. The modifiers progress-info, progress-success, progress-warning, and progress-danger set the fill color through --progress-fill, and bare progress is info.

<div class="progress" role="progressbar" aria-label="Upload" aria-valuemin="0" aria-valuemax="100" aria-valuenow="60">
<div class="progress-fill" style="width: 60%"></div>
</div>
<div class="progress" role="progressbar" aria-label="Connecting" aria-valuemin="0" aria-valuemax="100">
<div class="progress-fill"></div>
</div>
<div class="progress progress-success" role="progressbar" aria-label="Synced" aria-valuemin="0" aria-valuemax="100" aria-valuenow="80">
<div class="progress-fill" style="width: 80%"></div>
</div>
<div class="progress progress-danger" role="progressbar" aria-label="Disk" aria-valuemin="0" aria-valuemax="100" aria-valuenow="95">
<div class="progress-fill" style="width: 95%"></div>
</div>

progress-info is the bare color, named so a tone can be set from data. progress-warning completes the set.

<div class="progress progress-info" role="progressbar" aria-label="Indexing" aria-valuemin="0" aria-valuemax="100" aria-valuenow="40">
<div class="progress-fill" style="width: 40%"></div>
</div>
<div class="progress progress-warning" role="progressbar" aria-label="Quota" aria-valuemin="0" aria-valuemax="100" aria-valuenow="70">
<div class="progress-fill" style="width: 70%"></div>
</div>

The frame for a text field. Put it on a native <input>, or on a wrapper around a bare <input> to build a group with a leading icon or trailing button.

<input class="input" aria-label="Name" placeholder="Name" />
<input class="input" aria-label="Invalid" placeholder="Invalid" aria-invalid="true" />
<input class="input" aria-label="Warning" placeholder="Warning" data-field-state="warn" />
<input class="input" aria-label="Read only" value="Read only" readonly />
<input class="input" aria-label="Disabled" placeholder="Disabled" disabled />
<div class="input focus-ring-within flex">
<svg
aria-hidden="true"
class="size-4"
viewBox="0 0 16 16"
fill="none"
stroke="currentColor"
stroke-width="1.5"
>
<circle cx="7" cy="7" r="4" />
<path d="M10 10l3 3" />
</svg>
<input aria-label="Search" placeholder="Search" />
</div>
<select class="input" aria-label="Mode">
<option>single</option>
<option>multiple</option>
</select>

input-compact tightens the padding and sets text-xs, for dense panels.

<input class="input input-compact" aria-label="Compact size" placeholder="Compact" />

input-compact beside input tightens the padding and sets text-xs. The frame also fits a <textarea>, and a group frame takes each state from its direct child <input>. A frame with no native control takes data-disabled or data-readonly.

Disabled frame
Read only frame
<input class="input input-compact" aria-label="Compact" placeholder="Compact" />
<textarea class="input" aria-label="Notes" rows="2">Textarea</textarea>
<select class="input" aria-label="Disabled mode" disabled>
<option>single</option>
</select>
<div class="input focus-ring-within flex">
<input aria-label="Invalid in a group" value="Invalid in a group" aria-invalid="true" />
</div>
<div class="input focus-ring-within flex">
<input aria-label="Read only in a group" value="Read only in a group" readonly />
</div>
<div class="input focus-ring-within flex">
<input aria-label="Disabled in a group" value="Disabled in a group" disabled />
</div>
<div class="input" data-disabled>Disabled frame</div>
<div class="input" data-readonly>Read only frame</div>

readout is a read-only value box at field height. It is the input frame at the input-compact size in its readonly colors: 26px tall, a transparent border, and the gray-1 fill. A long value truncates on one line. It reads no state and does not need an <input>, so put it on a <span> or any other non-interactive element.

12.5A long value that does not fit on one line
<span class="readout">12.5</span>

A readout with a unit holds a readout-value and then a readout-suffix. It lays out as a row, so a long value truncates and the unit stays whole. Text put straight into a readout truncates from its end, which would cut the unit first. The suffix takes the color of a field’s suffix.

312.40mm-1234567.89mm
<span class="readout">
<span class="readout-value">312.40</span>
<span class="readout-suffix">mm</span>
</span>

Each state also applies when the attribute sits on a direct child <input> of the frame. On a native single <select>, the class replaces the browser’s arrow with a chevron and pads the right edge for it, so the frame reads the same as a text field.

State Attribute What changes
Hover :hover A darker border.
Invalid [aria-invalid="true"] A danger border.
Warning [data-field-state="warn"] A warning border.
Read only [readonly] A transparent border and a gray background.
Disabled :disabled or [data-disabled] Disabled colors and a not-allowed cursor.

Later states win ties. Disabled and read only beat invalid and warning, and every state beats hover.

popover-panel is the frame of a floating panel: a light border, a white fill, and the popover shadow. Inside it, listbox-option is one choice and listbox-heading labels a group of options. An option reads data-highlighted for the keyboard or pointer cursor and data-disabled for a choice that cannot be picked.

Fruit
Apple

Banana

Cherry

<div class="popover-panel p-1" role="listbox" aria-label="Fruit" aria-readonly="true">
<div role="group" aria-labelledby="fruit-heading">
<div id="fruit-heading" class="listbox-heading">Fruit</div>
<div class="listbox-option" role="option" aria-selected="false">Apple</div>
<div class="listbox-option" role="option" aria-selected="false" data-highlighted>Banana</div>
<div class="listbox-option" role="option" aria-selected="false" aria-disabled="true" data-disabled>Cherry</div>
</div>
</div>
State Attribute What changes
Highlighted [data-highlighted] A light background.
Disabled [data-disabled] Disabled text and a not-allowed cursor.

A segmented date entry. date-field is worn beside input on the frame, and each date-segment inside it is one part of the date. The frame rings while a segment has focus and takes a dark border while its picker is open, which beats the input hover border. The input invalid, warning, read only, and disabled borders beat the open border. An input-button inside the frame is a square icon button that darkens on hover.

A segment whose aria-valuetext is Empty shows placeholder text. A segment that is not data-segment="literal" takes a small inline padding and a medium fill on focus, so a literal separator stays plain.

mmddyyyy
03142026
03142026
<div class="input date-field" role="group" aria-label="Date" data-state="open">
<span class="date-segment" role="spinbutton" aria-label="month"
aria-valuemin="1" aria-valuemax="12" aria-valuetext="Empty">mm</span>
<span class="date-segment" data-segment="literal" aria-hidden="true">/</span>
<span class="date-segment" role="spinbutton" aria-label="day"
aria-valuemin="1" aria-valuemax="31" aria-valuenow="14">14</span>
<button type="button" class="input-button" aria-label="Open calendar">...</button>
</div>
State Attribute What changes
Empty segment [aria-valuetext="Empty"] Subtle placeholder text.
Focused segment :focus on a segment that is not literal A medium background.
Open [data-state="open"] A gray-9 border, also on hover.
Frame focus :focus-visible on a child The focus ring.
Button hover :hover on input-button Default text color.
Button disabled :disabled on input-button Disabled text and a not-allowed cursor.

The parts of a month grid. calendar-nav is a previous or next month button, calendar-weekday heads a weekday column, and calendar-day is one day. Today is semibold, an outside-month day is subtle, and an unavailable day is struck through. A selected day fills gray-9 under white text, which beats every other text color. On an unselected day, today’s color beats outside-month, which beats disabled.

SuMoTuWeThFrSa
<button type="button" class="calendar-nav" aria-label="Previous month">...</button>
<button type="button" class="calendar-nav" aria-label="Next month" aria-disabled="true" data-disabled>...</button>
<table aria-label="March 2026">
<thead>
<tr><th class="calendar-weekday" scope="col">Su</th>...</tr>
</thead>
<tbody>
<tr>
<td><button type="button" class="calendar-day" data-outside-month>30</button></td>
<td><button type="button" class="calendar-day" data-today aria-current="date">2</button></td>
<td><button type="button" class="calendar-day" data-selected aria-pressed="true">3</button></td>
<td><button type="button" class="calendar-day" data-disabled aria-disabled="true">4</button></td>
<td><button type="button" class="calendar-day" data-unavailable aria-disabled="true">5</button></td>
</tr>
</tbody>
</table>

calendar-day-range is worn with calendar-day in a range calendar and replaces its selected fill. The two ends fill gray-9 under white text. A selected or highlighted day between them takes a light fill and keeps its text color.

<button type="button" class="calendar-day calendar-day-range" data-selected aria-pressed="true" data-selection-start>10</button>
<button type="button" class="calendar-day calendar-day-range" data-selected aria-pressed="true">11</button>
<button type="button" class="calendar-day calendar-day-range" data-highlighted>12</button>
<button type="button" class="calendar-day calendar-day-range" data-selected aria-pressed="true" data-selection-end>13</button>
State Attribute What changes
Hover :hover on an enabled, unselected day A light background.
Today [data-today] Semibold, and heading color when unselected.
Outside month [data-outside-month] Subtle text.
Selected [data-selected] A gray-9 fill under white text.
Disabled [data-disabled] Disabled text and a not-allowed cursor.
Unavailable [data-unavailable] A line through the text.
Range ends [data-selection-start], [data-selection-end] A gray-9 fill under white text.
Range middle [data-selected] or [data-highlighted] A light fill, text color kept.
Nav disabled [data-disabled] on calendar-nav Disabled text and a not-allowed cursor.

switch-info, switch-success, switch-warning, and switch-danger set --switch-on, the track color a prime-ui Switch paints while it is on. They style nothing by themselves. Each sample below is a track painted with the property its class sets.

<span class="switch-info inline-block h-4 w-7 rounded-full" style="background-color: var(--switch-on)" role="img" aria-label="switch-info track"></span>
<span class="switch-success inline-block h-4 w-7 rounded-full" style="background-color: var(--switch-on)" role="img" aria-label="switch-success track"></span>
<span class="switch-warning inline-block h-4 w-7 rounded-full" style="background-color: var(--switch-on)" role="img" aria-label="switch-warning track"></span>
<span class="switch-danger inline-block h-4 w-7 rounded-full" style="background-color: var(--switch-on)" role="img" aria-label="switch-danger track"></span>

table-container goes on the <table>, table-header on the <thead>, table-header-cell on each <th>, and table-cell on each <td>. table-cell-link makes a link fill its cell and underline on hover. table-cell-flex lays several items out in one cell and lets them wrap. The table has a 1200px minimum width, so the example scrolls sideways.

MachineStatusTags
arm-01Online
labgantry
rover-07Offline
field
<table class="table-container">
<thead class="table-header">
<tr>
<th class="table-header-cell text-left" scope="col">Machine</th>
<th class="table-header-cell text-left" scope="col">Status</th>
<th class="table-header-cell text-left" scope="col">Tags</th>
</tr>
</thead>
<tbody>
<tr>
<td class="table-cell"><a class="table-cell-link" href="#table">arm-01</a></td>
<td class="table-cell"><span class="badge badge-success">Online</span></td>
<td class="table-cell">
<div class="table-cell-flex">
<span class="pill">lab</span>
<span class="pill">gantry</span>
</div>
</td>
</tr>
<tr>
<td class="table-cell"><a class="table-cell-link" href="#table">rover-07</a></td>
<td class="table-cell"><span class="badge badge-danger">Offline</span></td>
<td class="table-cell">
<div class="table-cell-flex">
<span class="pill">field</span>
</div>
</td>
</tr>
</tbody>
</table>

scrollbar-thin sets the standard scrollbar-width, and scrollbar-* sets the standard scrollbar-color to a color token for the thumb over a clear track. The rest style the WebKit scrollbar parts: scrollbar-w-* its width from the spacing scale, scrollbar-track-* and scrollbar-thumb-* their colors from the color tokens, and scrollbar-thumb-border-* the thumb’s radius, border width, or border color, by which token the value names. A browser that applies scrollbar-width ignores the WebKit parts on the same element, so use one approach per element.

A machine is a computer with components attached. Each component reports readings, and each reading can be captured and synced. A long enough paragraph overflows this box, so the scrollbar appears and shows its track and its thumb.

A machine is a computer with components attached. Each component reports readings, and each reading can be captured and synced. A long enough paragraph overflows this box, so the scrollbar appears and shows its track and its thumb.

<div class="h-24 w-64 scrollbar-w-2 scrollbar-track-gray-2 scrollbar-thumb-gray-6 scrollbar-thumb-border-sm overflow-y-scroll p-2 text-sm" tabindex="0" role="region" aria-label="Styled scrollbar">
A machine is a computer with components attached. Each component reports readings, and each reading can be captured and synced. A long enough paragraph overflows this box, so the scrollbar appears and shows its track and its thumb.
</div>
<div class="h-24 w-64 scrollbar-thin scrollbar-gray-6 overflow-y-scroll p-2 text-sm" tabindex="0" role="region" aria-label="Thin scrollbar">
A machine is a computer with components attached. Each component reports readings, and each reading can be captured and synced. A long enough paragraph overflows this box, so the scrollbar appears and shows its track and its thumb.
</div>

The slider-* classes style the track and thumb of a native <input type="range"> in both WebKit and Firefox. slider-track-* and slider-thumb-* take a color token. The -w-* and -h-* forms size each part from the spacing scale, slider-thumb-border-* sets the thumb’s border, bare slider-thumb-border makes it a round gray-bordered thumb, and the -cursor-* forms set the cursor over each part. The input still needs appearance-none, and so does its WebKit thumb.

<input
type="range"
aria-label="Speed"
class="w-48 appearance-none bg-transparent slider-track-gray-3 slider-track-h-1 slider-thumb-gray-7 slider-thumb-w-3 slider-thumb-h-3 slider-thumb-border slider-thumb-border-0 slider-thumb-cursor-grab [&::-moz-range-track]:rounded-full [&::-webkit-slider-runnable-track]:rounded-full [&::-webkit-slider-thumb]:-mt-1 [&::-webkit-slider-thumb]:appearance-none"
/>

focus-ring draws a 2px outline offset by 2px on :focus-visible. button, icon-button, and input already include it. focus-ring-within draws the same ring on a frame whose focus lives on a child, and it silences the child’s own ring.

<a href="/docs" class="focus-ring rounded-sm">Focusable link</a>
<div class="focus-ring-within flex gap-2 rounded-sm border border-light p-1">
<button type="button" class="button focus-ring">One</button>
<button type="button" class="button focus-ring">Two</button>
</div>
State Attribute What changes
Keyboard focus :focus-visible (focus-ring) The outline appears.
Focus inside :has(:focus-visible) (focus-ring-within) The outline appears on the frame.

bg-extralight, bg-light, bg-medium, and bg-dark name the gray surfaces, and border-light, border-medium, and border-dark name the gray borders. Each reads a gray token, so it follows the theme.

bg-extralight
bg-light
bg-medium
bg-dark
border-light
border-medium
border-dark
<div class="bg-extralight border border-light p-3 text-xs">bg-extralight</div>
<div class="bg-light border border-light p-3 text-xs">bg-light</div>
<div class="bg-medium border border-light p-3 text-xs">bg-medium</div>
<div class="bg-dark border border-light p-3 text-xs text-white">bg-dark</div>
<div class="border border-light p-3 text-xs">border-light</div>
<div class="border border-medium p-3 text-xs">border-medium</div>
<div class="border border-dark p-3 text-xs">border-dark</div>

text-display is the display heading: Space Grotesk at 24px, weight 500. text-code is Roboto Mono at the text-xs size.

text-display

text-code

<p class="text-display">text-display</p>
<p class="text-code">text-code</p>

shadow-popover and shadow-dialog are the two floating-surface shadows, backed by --shadow-popover and --shadow-dialog.

Popover
Dialog
<div class="shadow-popover rounded-sm bg-white p-3">Popover</div>
<div class="shadow-dialog rounded-sm bg-white p-4">Dialog</div>

The config names the stacking order of floating UI, so a popover opened inside a dialog clears the dialog and a tooltip clears both. Each layer is a z-* class backed by a --z-* token. Bare numbers such as z-50 and z-1150 still work, and steps of 100 leave room for a bare value between layers.

Class Token Value What sits on it
z-sticky --z-sticky 100 Headers and docked bars.
z-overlay --z-overlay 1000 A dialog’s backdrop.
z-dialog --z-dialog 1100 The dialog panel.
z-popover --z-popover 1200 Popovers, select panels, and comboboxes.
z-menu --z-menu 1200 Menus. Same value as z-popover, so a consumer never has to know which.
z-toast --z-toast 1300 Notifications.
z-tooltip --z-tooltip 1400 Above everything that can carry a hovered control.
z-max --z-max 9999 Reserved. Nothing may cover it.
<div class="z-overlay fixed inset-0 bg-gray-9/50">
<div class="z-dialog relative mx-auto mt-24 w-96 rounded-sm bg-white p-4">
Dialog panel
</div>
</div>
<div role="tooltip" class="z-tooltip absolute">Tooltip text</div>