Skip to content
Eskais UI

Data

Filter Bar

A UI SDK Toolbar of filters with one tab stop and arrow keys, a search field inside it, labelled fields aligned on their bottom edge, and a reset button that shows while filters apply.

Example

5 of 5 projects: Apollo, Borealis, Cygnus, Draco, Eridanus

Installation

npx shadcn@latest add @eskais/filter-bar
npm packagesclass-variance-authority@0.7.1lucide-react

Usage

Import
import {  createToolbarController,  FilterBar,  FilterBarButton,  FilterBarField,  FilterBarSearch,  FilterBarSeparator,} from "@/components/ui/filter-bar"

API reference

FilterBar

PropTypeDefault
labelrequiredstring–
childrenReactNode–
isFilteredbooleanfalse
onReset(event: MouseEvent) => void–
resetLabelstring"Reset filters"

Also takes every prop of UI SDK Toolbar except aria-label, children.

FilterBarButton

Takes every prop of UI SDK ToolbarButton except aria-label, ButtonLookProps.

FilterBarSeparator

Takes every prop of UI SDK ToolbarSeparator.

FilterBarSearch

PropTypeDefault
labelrequiredstring–

Also takes Input except aria-label, type.

FilterBarField

PropTypeDefault
labelrequiredThe visible label above the control.ReactNode–
childrenrequiredReactNode–

Also takes Field except children.

Other exports

createToolbarControllertype FilterBarButtonPropstype FilterBarFieldPropstype FilterBarPropstype FilterBarSearchProps

Accessibility

  • A toolbar of filters with one tab stop and arrow keys; reset appears only when something is filtered.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.