FilterListItem

A one-click filter for the list aside. It merges its value into the list filter, and removes it again when selected a second time.

Installation

pnpm dlx shadcn@latest add @chelone/filter-list-item

A one-click filter for the list aside. It merges its value into the list filter, and removes it again when selected a second time.

Props

PropTypeDefaultDescription
iconReactNode—
isSelected(value: FilterPayload, filters: FilterPayload) => boolean—Replaces `isFilterSelected`.
labelReactNode—A string is translated with itself as the fallback; an element renders as it is.
toggleFilter(value: FilterPayload, filters: FilterPayload) => FilterPayload—Replaces `toggleFilterValue`; returns the filters to set.
valueFilterPayload—The filter this item sets, and removes again once the list holds it.