Engram

Filter bar

component

A wrapping row of FilterPills — the active-filters strip above an inventory/collection grid.

Install

npx shadcn@latest add @engram/filter-bar

Registry item: /r/filter-bar.json — the machine-readable definition agents install from.

Example

Props

api

FilterBar

PropTypeDefaultDescription
onClear() => voidOptional "clear all" handler; renders a trailing clear button.

FilterPill

PropTypeDefaultDescription
label*ReactNodePill text.
activebooleanfalseWhether the toggle is on (tinted) — for filter toggles.
onToggle() => voidToggle handler; when set the body is a button.
onRemove() => voidRemove handler; when set a trailing × button is shown (removable chips).
countnumber | stringRight-aligned count (e.g. matches under this filter).
toneChipTone"accent"Active tone color. Defaults to accent.
classNamestring

Composition

pulled in on install
  • filter-barcomponent

Own the code: shadcn add copies this component's source into your repo to read and edit directly. Extend without forking — edit the source, use asChild to swap the element, or pass the typed annotations prop for curated data.