Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

TreeSelect

Route a ticket through a hierarchical selection.

Preview

Live preview

Changes apply to this preview only.

What can we help with?

Choose the closest topic so the message reaches the right team.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Basic

Click the trigger to open the panel, then expand a branch. The selected label is shown on the trigger.

Open preview

Controlled

value is the selected node value; onValueChange receives the value and its option.

Open preview

States

Helper context outside the field, a validation error, an empty data set, a read-only selection and a disabled control.

Open preview

Usage

Keep node identities stable and distinguish selectable leaves from structural groups.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluTreeSelectOption

Type source
PimoluTreeSelectOption public API
NameTypeDefaultDescription
valueRequiredstring—Public Pimolu prop; see the source declaration for details.
labelRequiredstring—Visible label associated with the control.
childrenreadonly PimoluTreeSelectOption[] | undefined—Public Pimolu prop; see the source declaration for details.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
valueRequired

string

No default extracted.

Public Pimolu prop; see the source declaration for details.

labelRequired

string

No default extracted.

Visible label associated with the control.

children

readonly PimoluTreeSelectOption[] | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

PimoluTreeSelectProps

Type source
PimoluTreeSelectProps public API
NameTypeDefaultDescription
idstring | undefined—Public Pimolu prop; see the source declaration for details.
optionsRequiredreadonly PimoluTreeSelectOption[]—Nested options. Any node, at any depth, can be selected.
valuestring | undefined—Controlled selection.
defaultValuestring | undefined—Initial selection when uncontrolled.
onValueChange((value: string | undefined, option?: PimoluTreeSelectOption) => void) | undefined—Called with the new value and its option. Clearing reports `undefined` for both.
placeholderstring | undefined"Select an option"Public Pimolu prop; see the source declaration for details.
labelstring | undefined—Visible label associated with the control.
errorstring | undefined—Error text below the field. It also marks the control invalid.
disabledboolean | undefinedfalsePublic Pimolu prop; see the source declaration for details.
clearableboolean | undefinedtruePublic Pimolu prop; see the source declaration for details.
searchableboolean | undefinedfalseShow a search field at the top of the panel.
emptyMessagestring | undefined"No options available."Public Pimolu prop; see the source declaration for details.
fullWidthboolean | undefinedfalseUse the available width of the parent.
classNamestring | undefined—Public Pimolu prop; see the source declaration for details.
styleCSSProperties | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelstring | undefined—Public Pimolu prop; see the source declaration for details.
aria-labelledbystring | undefined—Public Pimolu prop; see the source declaration for details.
aria-describedbystring | undefined—Public Pimolu prop; see the source declaration for details.
id

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

optionsRequired

readonly PimoluTreeSelectOption[]

No default extracted.

Nested options. Any node, at any depth, can be selected.

value

string | undefined

No default extracted.

Controlled selection.

defaultValue

string | undefined

No default extracted.

Initial selection when uncontrolled.

onValueChange

((value: string | undefined, option?: PimoluTreeSelectOption) => void) | undefined

No default extracted.

Called with the new value and its option. Clearing reports `undefined` for both.

placeholder

string | undefined

Default: "Select an option"

Public Pimolu prop; see the source declaration for details.

label

string | undefined

No default extracted.

Visible label associated with the control.

error

string | undefined

No default extracted.

Error text below the field. It also marks the control invalid.

disabled

boolean | undefined

Default: false

Public Pimolu prop; see the source declaration for details.

clearable

boolean | undefined

Default: true

Public Pimolu prop; see the source declaration for details.

searchable

boolean | undefined

Default: false

Show a search field at the top of the panel.

emptyMessage

string | undefined

Default: "No options available."

Public Pimolu prop; see the source declaration for details.

fullWidth

boolean | undefined

Default: false

Use the available width of the parent.

className

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

style

CSSProperties | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-label

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-labelledby

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

aria-describedby

string | undefined

No default extracted.

Public Pimolu prop; see the source declaration for details.

Accessibility

  • Check expansion, selection, search and disabled nodes with the keyboard.
Read the accessibility guide →