TreeMultiSelect

Designer doc
This is a combination of TreeSelect and MultiSelect components.

Example

Basic Usage
The default behaviour is only selected option is checked/unchecked without partially checkbox status
View code
An icon button can be used to trigger dropdown selection too.
View code
View code
Control Tree Checked Status
value of type Array<[SelectValue, Value]> can be provided to control the Tree checkbox selected status, with the tree option’s value as SelectValue, and Checkbox value true, false and null(partially selected) as Value
Note: might need to control initialExpandedValues and expandedValues to show the correct option value at TreeMultiSelectInput
View code
Input Text and Max Tag
Similar to MultiSelect, two common input components TreeMultiSelectInputText and TreeMultiSelectInputMaxTag is also provided
View code
Customization
TreeMultiSelectSearch and TreeMultiSelectChip is available for customization
View code
Dependent Child Options
By specifying isChildrenDependent, child options under selected parent will be shown as selected and disabled
View code

References

API

TreeMultiSelect
Prop nameTypeDefaultDescription
expandedValuesSelectValue[]
idstring
initialExpandedValuesSelectValue[]
initialIsOpenboolean
initialKeyboardHighlightedIndexnumber
initialMouseHighlightedIndexnumber
initialSearchValuestring
initialSelectedIndexnumber
initialValueTreeMultiSelectValue[]
isChildrenDependentboolean
isOpenboolean
keyboardHighlightedIndexnumber
mouseHighlightedIndexnumber
onChangeChangeCallback
onExpandedValuesChange(expanded: SelectValue[]) => void
onIsOpenChange(isOpen: boolean) => void
onKeyboardHighlightedIndexChange(index: number) => void
onMouseHighlightedIndexChange(index: number) => void
onSearchSearchCallback
onSelectChangeCallback
Different from onChange: onSelect is triggered even if the option's value is the selected one.
onSelectedIndexChange(index: number) => void
searchValuestring
This is not the selected value. Rather, it's a search value on input if you use SelectSearch.
selectedIndexnumber
stateReducerAcdcStateReducer(state, { nextState }) => nextState
valueTreeMultiSelectValue
TreeMultiSelectChip
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
clickableboolean
descriptionReactNode
Description to show for capsule-large choice and filter chips.
disableNavigationboolean
disabledboolean
Equivalent to button's disabled property.
ellipsisTooltipPropsOmit<EllipsisTooltipProps, "children">
indexnumber
Order index for keyboard navigation using arrow keys. By default, this prop is automatically added by the parent.
invalidboolean
keyboardClickKeysstring[]
leftElementReactNode
Element to be added on the left side of the label. Equivalent to adding the element manually on the label with a certain margin.
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onDelete(e: SyntheticEvent<HTMLDivElement, Event>) => void
Callback on Backspace key or delete icon is clicked. If this callback is not provided, icon is not rendered - meaning it's not deletable.
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
rightElementReactNode
Element to be added on the right side of the label. Equivalent to adding the element manually on the label with a certain margin.
valueSelectValue
variantChipVariants
TreeMultiSelectHighlighter
Prop nameTypeDefaultDescription
textstring
TreeMultiSelectIconButton
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
badgeCountnumber
badgePropsOmit<BadgeProps, "children">
colorTypeColorTypes
Set color based on theme. If color is specified, that prop is used instead of this.
disabledboolean
Equivalent to button's disabled property.
keyboardClickKeysstring[]
loadingboolean
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
radiusstring
sizeIconButtonSizes
tooltipReactNode
tooltipPropsOmit<TooltipProps, "title" | "children">
variantIconButtonVariants
TreeMultiSelectInput
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
disableChipNavigationboolean
disabledboolean
Equivalent to button's disabled property.
inputChipListPropsInputChipListProps & { ref?: Ref<HTMLDivElement>; }
keyboardClickKeysstring[]
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
placeholderReactNode
renderChip(val: SelectValue, i: number) => ReactNode
Renders chips per value when MultiSelect is open
searchElementReactNode<TreeMultiSelectSearch />
TreeMultiSelectInputMaxTag
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
disableChipNavigationboolean
disabledboolean
Equivalent to button's disabled property.
inputChipListPropsInputChipListProps & { ref?: Ref<HTMLDivElement>; }
keyboardClickKeysstring[]
labelReactNode
limitnumber
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
placeholderReactNode
renderChip(val: SelectValue, i: number) => ReactNode
Renders chips per value when MultiSelect is open
searchElementReactNode
tooltipPropsOmit<TooltipProps, "title" | "children"> & { children?: ReactNode; title?: ReactNode; }
TreeMultiSelectInputText
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
contentPropsContentProps
disableChipNavigationboolean
disabledboolean
Equivalent to button's disabled property.
inputChipListPropsInputChipListProps & { ref?: Ref<HTMLDivElement>; }
keyboardClickKeysstring[]
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
placeholderReactNode
renderChip(val: SelectValue, i: number) => ReactNode
Renders chips per value when MultiSelect is open
renderText(val: MultiSelectValue) => ReactNode
Renders displayed text when MultiSelect is closed
searchElementReactNode
tooltipPropsOmit<EllipsisTooltipProps, "children"> & { children?: ReactNode; }
TreeMultiSelectList
Prop nameTypeDefaultDescription
acdcScrollerPropsOptionsUseAcdcScrollerPropsOptions
Options for the useAcdcScrollerProps hook
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
containerHTMLElement
containerPropsDivProps
elevationLevelnumber
emptyPlaceholderReactNode
footerReactNode
headerReactElement<any, any>
immediateboolean
linedboolean
placement"left" | "right" | "bottom" | "top" | "top-start" | "top-end" | "left-start" | "left-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end"
popperReferenceHTMLElement
popperUpdateKeystring
widthSelectListWidth
TreeMultiSelectListFooter
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
TreeMultiSelectListSearch
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
autoComplete"on" | "off" | "nope"
disabledboolean
fullWidthboolean
width: 100% is too troublesome to handle with custom css because of the nesting
invalidboolean
leftElementReactNode
leftElementContainerPropsHTMLAttributes<HTMLDivElement> & { ref?: MutableRefObject<HTMLDivElement>; }
onChange(e: ChangeEvent<HTMLInputElement>) => void
onTextChange(val: string) => void
placeholderReactNode
readOnlyboolean
rightElementReactNode
rightElementContainerPropsHTMLAttributes<HTMLDivElement> & { ref?: MutableRefObject<HTMLDivElement>; }
type"number" | "text" | "password"
wrapperPropsWrapperProps
TreeMultiSelectOption
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
checkboxIconPropCheckboxIconProps
childrenNodesPropsChildrenNodesProps
disabledboolean
expandButtonReactNode
indexnumber
labelReactNode<>{value}</>
leftElementReactNode
nodePropsNodeProps
valueSelectValue
TreeMultiSelectOptionExpand
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
colorTypeColorTypes
Set color based on theme. If color is specified, that prop is used instead of this.
disabledboolean
Equivalent to button's disabled property.
keyboardClickKeysstring[]
loadingboolean
onBlurFocusEventHandler<HTMLDivElement>
onClickMouseEventHandler<HTMLDivElement>
onKeyDownKeyboardEventHandler<HTMLDivElement>
onKeyUpKeyboardEventHandler<HTMLDivElement>
onMouseDownMouseEventHandler<HTMLDivElement>
onMouseLeaveMouseEventHandler<HTMLDivElement>
onMouseUpMouseEventHandler<HTMLDivElement>
onReleaseEventHandler<SyntheticEvent<HTMLDivElement, Event>>
Callback that's triggered after click i.e. mouseup and keyup of enter or space.
onTouchEndTouchEventHandler<HTMLDivElement>
onTouchStartTouchEventHandler<HTMLDivElement>
radiusstring
sizeIconButtonSizes
tooltipReactNode
tooltipPropsOmit<TooltipProps, "title" | "children">
variantIconButtonVariants
TreeMultiSelectSearch
Prop nameTypeDefaultDescription
asany
Tag or component, but a simple tag (i.e. built-in components, e.g. div, span) is recommended.
TreeMultiSelectSearchableNodes
Prop nameTypeDefaultDescription
dataTreeData
filter(node: TreeNode, query: string) => boolean
Different from FilterNode in utils.
renderFromData(data: TreeData) => ReactNode
resetExpandedToSelectValue[]
skipboolean | ((query: string) => boolean)
    Example
    Example
    Basic Usage
    Basic Usage
    Search
    Search
    Control Tree Checked Status
    Control Tree Checked Status
    Input Text and Max Tag
    Input Text and Max Tag
    Customization
    Customization
    Dependent Child Options
    Dependent Child Options
    References
    References
    API
    API
    TreeMultiSelect
    TreeMultiSelect
    TreeMultiSelectChip
    TreeMultiSelectChip
    TreeMultiSelectHighlighter
    TreeMultiSelectHighlighter
    TreeMultiSelectIconButton
    TreeMultiSelectIconButton
    TreeMultiSelectInput
    TreeMultiSelectInput
    TreeMultiSelectInputMaxTag
    TreeMultiSelectInputMaxTag
    TreeMultiSelectInputText
    TreeMultiSelectInputText
    TreeMultiSelectList
    TreeMultiSelectList
    TreeMultiSelectListFooter
    TreeMultiSelectListFooter
    TreeMultiSelectListSearch
    TreeMultiSelectListSearch
    TreeMultiSelectOption
    TreeMultiSelectOption
    TreeMultiSelectOptionExpand
    TreeMultiSelectOptionExpand
    TreeMultiSelectSearch
    TreeMultiSelectSearch
    TreeMultiSelectSearchableNodes
    TreeMultiSelectSearchableNodes
Coral is a thoroughly developed design system widely adopted by developers and designers for creating beautiful and user-friendly Sea internal products.

Copyright © 2018-2025 Sea Labs