TreeSelect
Choose one or more values from hierarchical data.
Selection and search
Multiple selection and checks
States and panel width
Extended features
Selection limits and node rendering
The popup matches the field width by default (popupWidth="trigger"). Set popupWidth="auto" to fit the content, which may be narrower than the field, or popupWidth={300} for a fixed 300px width; CSS lengths are also supported. popupMaxWidth is unset by default. The example below fits the content with an explicit maximum width. Viewport edge avoidance still applies.
Single-line selections
Set tagWrap={false} to keep selected values on one line. Long labels truncate; extra values collapse into +N. In very narrow controls, only the count is shown. Open the popup to review or change selections. maxTagCount can further limit the visible tags; maxTagCount="responsive" also enables automatic single-line collapsing.
Reopening preserves the expanded branches. Click a category that cannot be selected to expand it; in checkbox mode, click anywhere on a row or press Enter / Space to check it. The arrow only expands or collapses the branch. Search temporarily reveals matching branches without changing the saved expansion.
TreeSelect API
TreeSelectOption
Types
Import these types to define props or prepare data.
Usage notes
Option values must be unique and stable. Example data:
TreeSelectValue is string | readonly string[] | null and can be used for controlled state. Checkbox mode submits checked leaves by default; showCheckedStrategy controls both display and callback values. Disabled existing selections are preserved by clear and linked checks.
ArrowDown enters the tree, Enter selects, Space checks and Escape closes. With an empty search in multiple mode, Backspace removes the last enabled selection. FormData submits repeated values under one field name; use getAll(name) to read them. Uncontrolled fields respond to form reset.