ToggleFilterButton

A one-click button that merges a filter value into the list filter and removes it when clicked again.

Installation

pnpm dlx shadcn@latest add @chelone/toggle-filter-button

A one-click button that merges a filter value into the list filter and removes it when clicked again.

Props

PropTypeDefaultDescription
classNamestring—
labelReactNode—A string is translated with itself as the fallback; an element renders as it is.
size"default" | "sm" | "lg" | "icon"—
valueFilterPayload—The filter this button sets, and removes again once the list holds it.