AsterUIDocsv1.0.2

Docs / Component reference

FilterBar

Keep search and active filters together so someone can see what narrowed the results and clear it.

Command bar example

Install

sh
npx @fierst/ui@1.0.2 add command-bar

Registry dependencies: theme, icon, search-input. Package dependencies: @lucide/icons.

Exports from ./ui/command-bar: FilterBar.

Download the registry source for command-bar 1.0.2.

API contracts

ts
export function FilterBar({
  query,
  onQueryChange,
  searchPlaceholder = 'Filter items…',
  filters = [],
  activeFilters = [],
  onToggleFilter,
  onClearAll,
  right,
  class: extraClass,
}: {
  query?: string;
  onQueryChange?: (q: string) => void;
  searchPlaceholder?: string;
  filters?: readonly { id: string; label: string }[];
  activeFilters?: readonly string[];
  onToggleFilter?: (id: string) => void;
  onClearAll?: () => void;
  right?: View;
  class?: string;
})