Pillbox
A flex-wrap container that lays out a collection of pills with a configurable gap. Purely presentational — it owns layout, the pills own their appearance and behavior.
Preview
<Pillbox gap="small">
<Pill label="Wetlands" variant="success" removable={false} />
<Pill label="Air quality" variant="info" removable={false} />
<Pill label="Overdue" variant="danger" removable={false} />
</Pillbox> Gaps
<Pillbox gap="small">…</Pillbox>
<Pillbox gap="medium">…</Pillbox>
<Pillbox gap="large">…</Pillbox> Wrapping
Pills wrap to a new row when they exceed the container width. Pillbox is agnostic to pill behavior — removable pills work as-is.
<div style="max-width: 360px;">
<Pillbox gap="small">…many pills…</Pillbox>
</div> API
| Prop | Type | Default | Description |
|---|---|---|---|
gap | 'small' | 'medium' | 'large' | 'small' | Spacing between pills. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
default | slot | — | Any number of pills (or other inline tags) to lay out. |
Accessibility
- A layout primitive only — adds no roles or semantics of its own.
- If the pills represent a set of filters or selections, give the wrapper an
aria-labelor group role at the call site.
Theming surface
Every public token this component reads, extracted from its source at build time,
split by blast radius: the hooks that belong to this component,
then the shared and system tokens it consumes alongside everything else. The
Resolves to column walks each token's real lineage —
component → semantic → primitive → raw value — so you
can see exactly where re-pointing it lands. A spoke re-skins by overriding these in
its theme-<slug>.css; component internals are never edited. No
hook for what you need? File it with /request-lego.
Type roles it names
This component does not set a size, weight, face or tracking of its own — it names a composite, and the composite carries all five. A composite is a class rather than a token, so none of it appears in the tables below; re-theme text by re-pointing the token family, not by editing the component.
| Role | Re-point | Reach |
|---|---|---|
.typography-label-md |
| +33 more componentsesa-app-bar, esa-breadcrumbs, esa-button-group, esa-button-toggle, esa-card, esa-checkbox-group, esa-color-picker, esa-combobox, esa-command-palette, esa-confirm-dialog, esa-danger-zone, esa-date-picker, esa-dialog, esa-empty-state, esa-entity-search, esa-file-upload, esa-filter-container, esa-form-field, esa-header-nav, esa-input-tag, esa-link-column, esa-page-header, esa-popover, esa-progress-bar, esa-radio-group, esa-range-slider, esa-select, esa-side-dialog, esa-sidebar-nav, esa-stat, esa-text-field, esa-textarea, esa-tooltip |
Wired to this component
None. This component has no hooks of its own — it themes entirely through the shared tokens below, so every override here also moves its siblings.
Shared tokens it reads
Owned by a family or by the semantic layer. Still overridable — but scope the
override (esa-foo { --form-border-color: … }) unless you mean to move
everything that reads it. Reach says what else that is.
| Token | Reach | Resolves to |
|---|---|---|
--spacing-100 | primitive every component | 0.25rem |
--spacing-200 | primitive every component | 0.5rem |
--spacing-300 | primitive every component | 0.75rem |