Animated tree-structured filter with nested checkboxes, live search, and indeterminate states.
Installation
Usage
How It Works
TreeFilterowns the checked state and exposes it via context.- Parent nodes show an indeterminate state when only some children are checked.
- Checking a parent toggles all its leaf descendants at once.
TreeFilterSearchfilters the visible tree in real time — branches with any matching descendant stay visible.- Expand/collapse uses Radix
Collapsiblewith a smooth animated chevron and height transition.
API Reference
TreeFilter
| Prop | Type | Default |
|---|---|---|
defaultChecked? | string[] | [] |
TreeFilterSearch
| Prop | Type | Default |
|---|---|---|
placeholder? | string | "Search..." |
TreeFilterGroup
| Prop | Type | Default |
|---|---|---|
label? | string | - |
TreeFilterList
| Prop | Type | Default |
|---|---|---|
items | TreeNode[] | - |