GitHub

Filter Container

Layout wrapper that lays out filter dropdowns, pills, and the clear button in a wrapping flex row with consistent gap. A pure layout primitive — it carries no runtime logic.

Stable .astro import EsaFilterContainer from '@esa/ecology/esa-filter-container.astro';

Preview

Compose a dropdown, the active-filter pills, and the clear button inside one container. It owns spacing and wrapping; the children own their own behavior.

Status:OpenDepartment:Water Quality
<FilterContainer>
  <esa-filter-dropdown name="status" label="Status" multiple></esa-filter-dropdown>
  <FilterPills filters={filters} />
  <FilterClearButton />
</FilterContainer>

Spacing

Tune the column and row gaps with spacing-token steps via gap and rowGap.

<FilterContainer gap="500" rowGap="300">
  <esa-filter-dropdown name="priority" label="Priority"></esa-filter-dropdown>
  <FilterClearButton label="Reset" />
</FilterContainer>

API

PropTypeDefaultDescription
gap string '300' Spacing-token step for the horizontal (column) gap between children.
rowGap string '200' Spacing-token step for the vertical (row) gap when children wrap.

Accessibility

  • A presentational <div> wrapper — it adds no roles or ARIA of its own; each child carries its own semantics.
  • Children flow left-to-right and wrap, preserving a natural reading and tab order.
  • Token-driven gaps keep targets visually separated without relying on color alone.

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.

RoleRe-pointReach
.typography-label-md
  • --typography-label-md-font-family 'DM Sans', sans-serif via --typography-font-family-sans → --font-family-dm-sans
  • --typography-label-md-font-size clamp(0.75rem, 0.66rem + 0.44vw, 0.9375rem) via --font-size-200
  • --typography-label-md-font-weight 500 via --typography-font-weight-medium → --font-weight-500
  • --typography-label-md-letter-spacing 0.01em via --letter-spacing-default
  • --typography-label-md-line-height 1.6 via --line-height-normal
+33 more components esa-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-form-field, esa-header-nav, esa-input-tag, esa-link-column, esa-page-header, esa-pillbox, 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

No other component reads these — re-point them and esa-filter-container is the only thing that moves.

Token Tier Resolves to
--filter-container-padding component 0

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-200 primitive every component 0.5rem