VERIFICATION-0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
Active filters · Extended localized content for verification and layout resilience
- Status: Open
- Owner: Me
<forma-active-filter-summary>
Keeps active query refinements and scope visible while filter controls recompose.
<forma-active-filter-summary>patterns/active-filter-summary.htmlAn active filter summary lists every refinement currently applied to a collection, each as readable text with its own remove button, plus a Clear all action. It keeps the query state visible when the filter controls themselves are collapsed into a disclosure, Flyout or phone layout. Forma provides the heading row and the wrapping list; the application supplies the filters, the wording, which ones can be removed, and what removing one does.
ul laid out as a wrapping flex row with 0.5rem gaps.li pairs the filter text with its remove button; on phones the pair itself can wrap.min-inline-size: 0, so long filter values wrap instead of overflowing.The smallest correct markup: the canonical pattern from patterns/active-filter-summary.html inside its public tag. Copy this first, then adapt labels, names and state.
Rendered from the canonical pattern file.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-active-filter-summary class="forma-component-tag">
<section class="forma-active-filter-summary" aria-labelledby="active-filters-title">
<div class="forma-active-filter-summary__heading">
<h2 id="active-filters-title">Active filters</h2>
<button type="button">Clear all</button>
</div>
<ul class="forma-active-filter-summary__items">
<li><span>Status: Open</span><button type="button" aria-label="Remove Status: Open filter">Remove</button></li>
<li><span>Owner: Me</span><button type="button" aria-label="Remove Owner: Me filter">Remove</button></li>
</ul>
</section>
</forma-active-filter-summary>
Click or tap the code once to select all of it, then copy.
The workspace scope is shown but has no remove button because it is set by the page, not by the user's query. The date range and status filters can be removed individually.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-active-filter-summary class="forma-component-tag">
<section class="forma-active-filter-summary" aria-labelledby="active-filter-summary-fixed-scope-title">
<div class="forma-active-filter-summary__heading">
<h2 id="active-filter-summary-fixed-scope-title">Showing invoices matching</h2>
<button type="button">Clear filters</button>
</div>
<ul class="forma-active-filter-summary__items">
<li><span>Workspace: Finance EU (fixed)</span></li>
<li><span>Due: 1–30 Sep 2026</span><button type="button" aria-label="Remove Due: 1–30 Sep 2026 filter">Remove</button></li>
<li><span>Status: Overdue</span><button type="button" aria-label="Remove Status: Overdue filter">Remove</button></li>
</ul>
</section>
</forma-active-filter-summary>
Click or tap the code once to select all of it, then copy.
After Clear all, the summary stays in place and says that no filters are applied, rather than disappearing and shifting the results up. The Clear all button is not rendered because there is nothing to clear.
No filters applied. Showing all 1,284 records.
<forma-active-filter-summary class="forma-component-tag">
<section class="forma-active-filter-summary" aria-labelledby="active-filter-summary-no-active-filters-title">
<div class="forma-active-filter-summary__heading">
<h2 id="active-filter-summary-no-active-filters-title">Active filters</h2>
</div>
<p>No filters applied. Showing all 1,284 records.</p>
</section>
</forma-active-filter-summary>
Click or tap the code once to select all of it, then copy.
Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.
Five filters on a phone. Filters wrap onto several rows and a long value wraps within its own item, next to its remove button.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
<forma-active-filter-summary class="forma-component-tag">
<section class="forma-active-filter-summary" aria-labelledby="active-filter-summary-mobile-many-filters-title">
<div class="forma-active-filter-summary__heading">
<h2 id="active-filter-summary-mobile-many-filters-title">Active filters</h2>
<button type="button">Clear all</button>
</div>
<ul class="forma-active-filter-summary__items">
<li><span>Status: Awaiting reply</span><button type="button" aria-label="Remove Status: Awaiting reply filter">Remove</button></li>
<li><span>Owner: Me</span><button type="button" aria-label="Remove Owner: Me filter">Remove</button></li>
<li><span>Product: Reporting and analytics exports</span><button type="button" aria-label="Remove Product: Reporting and analytics exports filter">Remove</button></li>
<li><span>Priority: High</span><button type="button" aria-label="Remove Priority: High filter">Remove</button></li>
<li><span>Updated: Last 7 days</span><button type="button" aria-label="Remove Updated: Last 7 days filter">Remove</button></li>
</ul>
</section>
</forma-active-filter-summary>
Click or tap the code once to select all of it, then copy.
The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.
Static specimen. Its buttons stand for application actions that the consuming application implements; this script-free documentation does not perform them. Its controls are shown for their markup and appearance and cannot be operated here.
Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.
| Attribute | On | Values | Default | Description |
|---|---|---|---|---|
aria-labelledby | section.forma-active-filter-summary | id of the heading | — | Names the summary region. |
aria-label | remove button | "Remove <filter> filter" | — | Identifies which filter a Remove button removes; the visible label alone is ambiguous. |
type | button | button | — | Remove and Clear all are native buttons handled by the application. |
| Hook | Kind | Values or default | Description |
|---|---|---|---|
.forma-active-filter-summary | Block class | — | Root section; a grid with 0.5rem gaps. |
.forma-active-filter-summary__heading | Element class | — | Wrapping flex row with the heading (margin removed from its h2) and the Clear all action spaced apart. |
.forma-active-filter-summary__items | Element class | — | Unstyled list laid out as a wrapping flex row; each li is a flex pair of filter text and remove button, allowed to wrap at 30rem and below. |
| Keys | Result |
|---|---|
| Tab / Shift+Tab | Moves through Clear all and each remove button in order. |
| Enter / Space | Activates the focused button (native). The application removes the filter and re-queries. |
| Event | Description |
|---|---|
click | Native click on Remove or Clear all; the application updates the query, the list and the result count. |
Not a form control. The filter values live in the application's query state.
| State | How it is expressed | Presentation |
|---|---|---|
| Filters applied | li items in .forma-active-filter-summary__items | One item per refinement, each with a remove button when removable. |
| Fixed scope | li without a remove button | Visible but not removable here; say so in the text. |
| No filters | application replaces the list with text | The summary states that no filters are applied. |
Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.