Filter Panel
Collapsible Liquid Glass filter area for list pages — a search field plus rows of single / multiple choice chips, kept as a draft until Search and reset in one tap.
FilterPanel is a block (registry:block) for the top of a list page. It is business-agnostic: parse your URL query into values, and write what onApply hands back to the URL.
- Draft first: tapping chips or typing only edits a draft. Search (or Enter in the search field) applies it; Reset clears and applies at once. When
valueschange elsewhere (back / forward), the draft restarts from them. - Collapsible:
alwaysVisiblerows stay on screen; the rest fold away under More filters, which shows a count of active hidden filters. - Apple 27 chips: options are
ToggleGroupItem variant="outline"capsules — the Bordered fill, and the solid accent fill once chosen. A single-choice row clears when the chosen chip is tapped again. - Liquid Glass: the panel is a glass
Card(its search field and chips switch to Over-Glass);glass={false}renders it 100% opaque. - Responsive: desktop aligns every row in a two-column grid (the label column takes the longest label); phones stack each label above its chips with 34pt touch targets.
Installation (Shadcn Registry)
npx shadcn@latest add @apple-liquid/filter-panelInstalls into components/blocks/filter-panel/ together with card, input-group, toggle-group, badge and skeleton.
Usage
'use client';
import { FilterPanel, type FilterPanelValues } from '@/components/blocks/filter-panel';
export function OrdersFilters({
values,
onApply,
}: {
values: FilterPanelValues;
onApply: (values: FilterPanelValues) => void;
}) {
return (
<FilterPanel
values={values}
onApply={onApply}
searchKey="q"
searchPlaceholder="Order number or customer"
alwaysVisible={1}
rows={[
{
key: 'status',
label: 'Status',
options: [
{ value: 'paid', label: 'Paid' },
{ value: 'shipped', label: 'Shipped' },
],
},
{
key: 'region',
label: 'Region',
multiple: true,
options: [
{ value: 'east', label: 'East' },
{ value: 'west', label: 'West' },
],
},
]}
/>
);
}Pairs naturally with the Data Table block: both keep their state in the URL.
Props API
| Prop | Type | Default | Description |
|---|---|---|---|
values | Record<string, string | string[] | undefined> | — | Applied filters (usually from the URL) |
onApply | (values) => void | — | Receives the cleaned filter set on Search, Enter or Reset |
rows | FilterPanelRow[] | — | { key, label, options, multiple?, emptyText?, loading? } |
searchKey / searchPlaceholder | string | — | Key of the search field; omit to hide it |
alwaysVisible | number | 0 | Rows that stay visible while collapsed |
defaultExpanded | boolean | false | Start expanded |
glass | boolean | true | Glass panel / SDF edge refraction; glass={false} is 100% opaque |
locale | LiquidGlassLocaleInput | Global locale | UI language of this instance; overrides <LiquidGlassProvider locale> |
messages | Partial<FilterPanelMessages> | Built-in text | Text overrides, deep-merged over the built-in text and the global messages.filterPanel |
File Preview
Preview almost any file in the browser — images, video, PDF, Office, archives, e-mail, CAD, 3D models, maps and code — with a Liquid Glass toolbar and an all-viewer dialog. Every format library loads on demand.
Settings Split
System Settings-style two-pane layout — a resizable, collapsible Liquid Glass navigation of iOS icon tiles beside your content, switching to iOS 27 segmented tabs on phones.