Carregando…
Carregando…
Carregando…Horizontal pill filter bar with single/multi select, counts and clear button.
$ npx kikitocn add filter-bar@/lib/utilsimport { FilterBar } from "@/components/ui/cn/filter-bar/FilterBar";
export function FilterBarExample() {
return (
<FilterBar />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
options* | FilterBarOption[] | — | Lista de filtros: { value, label, count? } |
value | string[] | undefined | Filtros ativos (controlled) |
defaultValue | string[] | [] | Filtros iniciais (uncontrolled) |
onChange | (values: string[]) => void | undefined | Callback quando a seleção muda |
multiSelect | boolean | false | Permite múltiplos filtros ativos ao mesmo tempo |
clearable | boolean | true | Exibe botão para limpar todos os filtros |
Multi-select
Single select