Pass the tree as items. Each node has a value, a label, and optional children. The value is always a string[].
category-picker.tsx
TreeSelect
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| items | — | The tree: each node has value, label, and optional children, count, disabled, disabledReason, hasChildren. | |
| value | readonly string[] | — | The picked values. With store="leaves" (default) only leaves; with store="compact" a full branch is its own value ("watches" for all 5 watches), so new children join it. |
| default | readonly string[] | — | |
| on | — | ||
| multiple | boolean | true | Pick many (checkboxes, chips) or one (no boxes, the path in the trigger). Default true. |
| store | "compact""leaves" | "leaves" | How the value names a full branch: each leaf (leaves), or the branch (compact). |
| get | — | Loads the rows of a branch with hasChildren and no children, when it opens. | |
| open | boolean | — | |
| default | boolean | false | |
| on | — | ||
| disabled | boolean | false | |
| read | boolean | false | |
| invalid | boolean | false | |
| name | string | — | The field name the form sends: one entry per value. |
| size | "default""lg" | "default" | The trigger row: default 32px with 24px chips, lg 36px with 28px chips. |
| locale | string | — | The search locale. Default: the DisplayLocaleProvider locale, else en-US. |
| labels | — | ||
| class | string | — | Classes of the root box (its width). |
| children | ReactNode | — | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TreeSelectTrigger
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label | string | — | Defines a string value that labels the current element. Names the field ("Applies to"): the trigger has no visible label of its own. |
| aria-labelledby | string | — | Identifies the element (or elements) that labels the current element. |
| placeholder | string | — | The muted text while nothing is picked. |
| max | number | 3 | The chips that show before the rest fold into "+N". Default 3. |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TreeSelectContent
<div>| Prop | Type | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| class | string | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | boolean | — | Show an arrow that points at the trigger. The gap grows from 4px to 8px. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | boolean | — | Put a clear layer under the popup (Base UI Popover.Backdrop), for example to dim it. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| padding | "default""none""tight" | — | default: radius 14, 12px padding and 10px between the parts, 288px wide. tight: 4px padding and 4px between the parts, as wide as the content: a row of 28px actions (a plain Toolbar) with the 4px inset of the bar recipe, 38px high (the selection pill of the Quote Reply). none: no padding and no gap, as wide as the content: a panel that lays out its own parts edge to edge (a head with a rule, a scroll box, a docked composer: the Chat Popup). Give it a width and a height with layout classes; the body fills that height. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| portal | — | Other Base UI props of the inner parts. A className here adds to the component classes. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| positioner | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| backdrop | PopupPartProps<PopoverBackdropProps> | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| arrow | PopupPartProps<PopoverArrowProps> | — | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| close | — | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From Base UIPopover.PortalBase UI docs | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| anchor | — | An element to position the popup against. By default, the popup will be positioned against the trigger. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| position | "absolute""fixed" | 'absolute' | Determines which CSS position property to use. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| side | "bottom""inline-end""inline-start""left""right""top" | 'bottom' | Which side of the anchor element to align the popup against. May automatically change to avoid collisions. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TreeSelectSearch
<input>| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Things at the end of the row, after the clear button: TreeSelectExpandAll. |
| ...props | <input> attributes | — | Every other attribute goes to the <input>, with a ref. |
TreeSelectExpandAll
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
TreeSelectTree
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label | string | — | Names the tree ("Categories"). |
| class | string | — | |
| render | — | A mark before a row label: an icon per node (a folder, a flag). | |
TreeSelectFooter
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
TreeSelectCount
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
TreeSelectClear
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
TreeSelectDone
<button>| Prop | Type | Default | Description | ||||
|---|---|---|---|---|---|---|---|
| class | string | — | |||||
| busy | boolean | — | The button waits for the app (busy words): a spinner, aria-busy, and no clicks. Focus stays on the button. The style hook stays data-loading. | ||||
| spinner | "center""start" | — | center (default): the spinner covers the label. start: it takes the leading icon slot. The icon sizes always use center, because their one icon is the label. | ||||
| glass | "clear""dark""light" | — | |||||
| rounded | "default""full" | — | |||||
| size | "default""icon""icon-lg""icon-sm""icon-xs""lg""sm""xl""xs" | — | |||||
| variant | "dashed""default""destructive""destructive-outline""ghost""link""media""outline""secondary" | — | |||||
From Base UIButtonBase UI docs | |||||||
| focusable | boolean | false | Whether the button should be focusable when disabled. | ||||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |||||
| style | — | Style applied to the element, or a function that returns a style object based on the component's state. | |||||
| |||||||
| ...props | <button> attributes | — | Every other attribute goes to the <button>, with a ref. | ||||
| EnterorSpace | On the field, opens the popup. Focus goes to the search. |
|---|---|
| Down Arrow | In the search, moves focus to the first row of the tree. |
| Up ArroworDown Arrow | Moves between the rows. A disabled row is skipped. |
| Right ArroworLeft Arrow | Opens or closes the branch of the row. Right to left swaps them. |
| Space | Checks or clears the row. On a parent, it checks or clears every leaf under it. |
| Backspace | In an empty search, removes the last pick. |
| Escape | In the search, clears the text first. Then it closes the popup, and focus goes back to the field. |
| Tab | From the field, moves to the chips. Left Arrow and Right Arrow move between them. |
| DeleteorBackspace | On a chip, removes the pick. A branch chip removes every leaf under it. |
Built with
Installs with Tree Select











