Filter Clear Button
Ghost/link-style button that clears all active filters. Optional leading filter-x icon, customizable label, and a bubbling esa-filter-clear event on click.
Preview
<FilterClearButton /> Variants
Override the label, and drop the icon for a plain link-style action.
<FilterClearButton label="Reset filters" />
<FilterClearButton label="Clear all" showIcon={false} /> API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | 'Clear all' | Visible button text. |
showIcon | boolean | true | Show the leading filter-x icon. |
hidden | boolean | false | Suppress rendering entirely (renders no DOM). |
Events
| Prop | Type | Default | Description |
|---|---|---|---|
esa-filter-clear | (no detail) | — | Bubbling/composed. Fires on click so a parent container can clear all active filters. |
Accessibility
- Renders a native
<button>with a fixedaria-label="Clear all filters", so the name is stable even whenlabelchanges. - The leading icon is
aria-hidden— decorative only. - Hover applies a subtle overlay; focus-visible shows a 2px primary outline via
--focus-ring-*tokens.
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-microcopy-sm |
| +3 more componentsesa-filter-dropdown, esa-pill, esa-sidebar-nav |
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 |
|---|---|---|
--focus-ring-color | component focus ring group · +34 more | #3e9b4f via --color-border-default-focus → --color-grass-10 |
--focus-ring-offset | component focus ring group · +31 more | 2px |
--focus-ring-width | component focus ring group · +35 more | 2px via --border-width-focus → --border-width-200 |
--color-background-overlay-hover | semantic every component | rgba(0, 0, 0, 0.03) |
--color-content-default-secondary | semantic every component | #646464 via --color-gray-11 |
--color-content-utility-danger | semantic every component | #ce2c31 via --color-red-11 |
--radius-sm | semantic every component | 0.25rem via --radius-100 |
--transition-fast | semantic every component | 150ms via --duration-150 |
--spacing-100 | primitive every component | 0.25rem |
--spacing-200 | primitive every component | 0.5rem |