生态产品多个设计器现已发布候选版本

查看生态总览
Skip to content

Tree ​

Data display component. This page is the API reference, generated from the source code. Usage guidance and live examples are on the Chinese page.

Anatomy ​

Parts in bold are required.

data-scope="tree": root · label · tree · item · item-indicator · item-text · item-description · item-suffix · branch · branch-control · branch-trigger · branch-indicator · branch-text · branch-description · branch-content · branch-loading · branch-error · branch-retry-trigger · branch-empty · node-drag-trigger · empty · loading · live-region

API reference ​

Descriptions of individual props, events and slots are written in Chinese and appear on the Chinese page.

Artifacts ​

LayerValue
Custom element<xh-tree>
Vue componentsXhTreeBranch XhTreeBranchContent XhTreeBranchControl XhTreeBranchDescription XhTreeBranchEmpty XhTreeBranchError XhTreeBranchIndicator XhTreeBranchLoading XhTreeBranchRetryTrigger XhTreeBranchText XhTreeBranchTrigger XhTreeEmpty XhTreeItem XhTreeItemDescription XhTreeItemIndicator XhTreeItemSuffix XhTreeItemText XhTreeLabel XhTreeLiveRegion XhTreeLoading XhTreeNodeDragTrigger XhTreeRoot XhTreeTree
ComposableuseTree
State machinetreeMachine
Skin@xihan-ui/styles/tree.css

Props ​

PropTypeRequired
labelledboolean
collectionTreeNode[]
virtualizerCollectionVirtualizer
variantControlVariant
sizeSize
leafOrientationOrientation
expandedValuestring[]
defaultExpandedValuestring[]
selectionstring[]
defaultSelectionstring[]
selectionModeTreeSelectionMode
cascadeboolean
checkedStrategyCascadeStrategy
expandOnClickboolean
disabledboolean
loadingboolean
loadingValuestring[]
loadChildrenBranchLoadChildren<TreeNode>
linesboolean
loopboolean
typeaheadboolean
dirDirection
translationsPartial<TreeTranslations>
nodeDraggableboolean
allowDrop(move: TreeMove) => boolean
onNodeMove(move: TreeMove) => void
onExpandedValueChange(details: TreeExpandedValueChangeDetails) => void
onSelectionChange(details: TreeSelectionChangeDetails) => void
onBranchLoadStart(details: TreeBranchLoadStartDetails) => void
onBranchLoad(details: TreeBranchLoadDetails) => void
onBranchLoadError(details: TreeBranchLoadErrorDetails) => void

TreeNode ​

Elements of collection.

FieldTypeRequired
valuestringYes
labelstring
disabledboolean
draggableboolean
toneTone
descriptionstring
childrenTreeNode[]
hasChildrenboolean
childrenOrientationOrientation

Events ​

Custom elements put the payload in detail; Vue emits an event of the same name.

EventPayload
expanded-value-changeTreeExpandedValueChangeDetails
selection-changeTreeSelectionChangeDetails
node-moveTreeNodeMoveDetails
branch-load-startTreeBranchLoadStartDetails
branch-loadTreeBranchLoadDetails
branch-load-errorTreeBranchLoadErrorDetails

Slots ​

Only slots with a payload are listed.

Vue componentSlotPayload
XhTreeRootdefaultTreeRootSlotProps
XhTreeRootlabel—

React adapter props ​

Only the props each component declares itself: DOM attributes inherited from ComponentPropsWithRef are left out, and root props already listed in the Props table are not repeated. The Vue counterpart is the slot table above.

React componentPropTypeRequired
XhTreeBranchvaluestringYes
XhTreeItemvaluestringYes
XhTreeRootlabelReactNode
XhTreeRootchildrenSlotChildren<TreeRootSlotProps>

State ​

Public state is written to data-state.

PartValues
branch'open' | 'closed'
branch-control'open' | 'closed'
branch-trigger'open' | 'closed'
branch-indicator'open' | 'closed'
branch-text'open' | 'closed'
branch-description'open' | 'closed'
branch-content'open' | 'closed'
branch-loading'open' | 'closed'
branch-error'open' | 'closed'
branch-retry-trigger'open' | 'closed'
branch-empty'open' | 'closed'

The following names are internal to the state machine.

States: idle

Events: EXPANDED.SET · BRANCH.EXPAND · BRANCH.COLLAPSE · BRANCH.TOGGLE · BRANCH.RETRY · SELECTION.SET · NODE.SELECT · NODE.FOCUS · TREE.BLUR · NODE_DRAG.START · NODE_DRAG.MOVE · NODE_DRAG.END · NODE_DRAG.CANCEL · NODE.MOVE_BY · PRESS.START · PRESS.END

Guards: canPress

connect API ​

getXxxProps() returns the host attributes of the matching part.

MemberType
collectionreadonly TreeNode[]
visibleNodesreadonly TreeVisibleNode[]
dropTargetDropTarget | null
announcementstring
expandedValuestring[]
selectionstring[]
focusedValuestring | null
selectionModeTreeSelectionMode
disabledboolean
translationsTreeTranslations
isExpanded(value: string) => boolean
isSelected(value: string) => boolean
isIndeterminate(value: string) => boolean
branchLoadState(value: string) => TreeBranchLoadSnapshot | null
setExpandedValue(next: string[]) => void
setSelection(next: string[]) => void
expand(value: string) => void
collapse(value: string) => void
retryBranch(value: string) => void
select(value: string, options?: { extend?: boolean, additive?: boolean }) => void
getRootProps() => T['element']
getLabelProps() => T['element']
getTreeProps() => T['element']
getEmptyProps() => T['element']
getLoadingProps() => T['element']
getNodeDragTriggerProps(props: TreeNodeProps) => T['element']
getLiveRegionProps() => T['element']
getItemProps(props: TreeNodeProps) => T['element']
getItemTextProps(props: TreeNodeProps) => T['element']
getItemDescriptionProps(props: TreeNodeProps) => T['element']
getItemSuffixProps(props: TreeNodeProps) => T['element']
getItemIndicatorProps(props: TreeNodeProps) => T['element']
getBranchProps(props: TreeNodeProps) => T['element']
getBranchControlProps(props: TreeNodeProps) => T['element']
getBranchTriggerProps(props: TreeNodeProps) => T['element']
getBranchIndicatorProps(props: TreeNodeProps) => T['element']
getBranchTextProps(props: TreeNodeProps) => T['element']
getBranchDescriptionProps(props: TreeNodeProps) => T['element']
getBranchContentProps(props: TreeNodeProps) => T['element']
getBranchLoadingProps(props: TreeNodeProps) => T['element']
getBranchErrorProps(props: TreeNodeProps) => T['element']
getBranchRetryTriggerProps(props: TreeNodeProps) => T['button']
getBranchEmptyProps(props: TreeNodeProps) => T['element']

Accessibility ​

Keyboard ​

Specification: W3C APG. Each row is a stable behavior id that the conformance tests cover; the conditions and effects are described on the Chinese page.

KeysBehavior
Tab / Shift+Tabtree.kbd.tab
ArrowDowntree.kbd.next
ArrowUptree.kbd.prev
Hometree.kbd.first
Endtree.kbd.last
ArrowRighttree.kbd.expand
ArrowLefttree.kbd.collapse
Enter / Spacetree.kbd.select
Enter / Spacetree.kbd.retry
Ctrl+Space / Cmd+Spacetree.kbd.toggle
Enter / Spacetree.kbd.press
*tree.kbd.expand-siblings
any single printable charactertree.kbd.typeahead
Alt+ArrowUp / Alt+ArrowDowntree.kbd.node-move
Alt+ArrowLeft / Alt+ArrowRighttree.kbd.node-move-level

ARIA ​

These attributes are produced by connect.

PartAttributeValue
treearia-busy'true' | undefined
treearia-disabled'true' | 'false'
treearia-labelledbyid of the label part | undefined
treearia-multiselectable'true' | 'false'
treearia-orientation'vertical'
treerole'tree'
itemaria-checked'true' | 'mixed' | 'false' | undefined
itemaria-disabled'true' | 'false'
itemaria-levelmeta?.level
itemaria-posinsetmeta?.posInSet
itemaria-selected'true' | 'false'
itemaria-setsizemeta?.setSize
itemrole'treeitem'
item-indicatoraria-hidden'true'
brancharia-busy'true' | undefined
brancharia-checked'true' | 'mixed' | 'false' | undefined
brancharia-disabled'true' | 'false'
brancharia-expanded'true' | 'false'
brancharia-levelmeta?.level
brancharia-posinsetmeta?.posInSet
brancharia-selected'true' | 'false'
brancharia-setsizemeta?.setSize
branchrole'treeitem'
branch-triggeraria-hidden'true'
branch-indicatoraria-hidden'true'
branch-contentrole'group'
branch-loadingrole'status'
branch-errorrole'alert'
branch-retry-triggeraria-labeltranslations.retry
branch-emptyrole'status'
node-drag-triggeraria-hidden'true'
live-regionaria-atomic'true'
live-regionaria-live'polite'
live-regionrole'status'

Style reference ​

Skin ​

@xihan-ui/styles/tree.css is written against [data-scope="tree"][data-part="root"] part selectors; the published build uses the mount class .xh-scope-tree in place of data-scope (same specificity) and sits in the xihan.components layer. Put overrides in xihan.overrides; the part selectors work as usual.

Data attributes ​

Produced by connect; valueless attributes are omitted while their condition does not hold.

PartAttributeValue
rootdata-disabled'' (present only while the condition holds)
rootdata-loading'' (present only while the condition holds)
rootdata-orientation'vertical'
rootdata-sizeprops.size
rootdata-variantprops.variant
labeldata-disabled'' (present only while the condition holds)
treedata-disabled'' (present only while the condition holds)
treedata-lines'' (present only while the condition holds)
treedata-loading'' (present only while the condition holds)
treedata-orientation'vertical'
itemdata-disabled'' (present only while the condition holds)
itemdata-draggable'' (present only while the condition holds)
itemdata-dragging'' (present only while the condition holds)
itemdata-drop'before' | 'after' | 'inside'
itemdata-highlighted'' (present only while the condition holds)
itemdata-indeterminate'' (present only while the condition holds)
itemdata-pressed'' (present only while the condition holds)
itemdata-selected'' (present only while the condition holds)
itemdata-tonemetaOf(value)?.tone
itemdata-xh-collection-context'overlay'
itemdata-xh-collection-item''
itemdata-xh-collection-sizeprops.size
item-indicatordata-disabled'' (present only while the condition holds)
item-indicatordata-highlighted'' (present only while the condition holds)
item-indicatordata-indeterminate'' (present only while the condition holds)
item-indicatordata-selected'' (present only while the condition holds)
item-indicatordata-xh-collection-slot'indicator'
item-textdata-disabled'' (present only while the condition holds)
item-textdata-highlighted'' (present only while the condition holds)
item-textdata-indeterminate'' (present only while the condition holds)
item-textdata-selected'' (present only while the condition holds)
item-textdata-xh-collection-slot'text'
item-descriptiondata-disabled'' (present only while the condition holds)
item-descriptiondata-highlighted'' (present only while the condition holds)
item-descriptiondata-indeterminate'' (present only while the condition holds)
item-descriptiondata-selected'' (present only while the condition holds)
item-descriptiondata-xh-collection-slot'description'
item-suffixdata-disabled'' (present only while the condition holds)
item-suffixdata-highlighted'' (present only while the condition holds)
item-suffixdata-indeterminate'' (present only while the condition holds)
item-suffixdata-selected'' (present only while the condition holds)
item-suffixdata-xh-collection-slot'suffix'
branchdata-disabled'' (present only while the condition holds)
branchdata-empty'' (present only while the condition holds)
branchdata-error'' (present only while the condition holds)
branchdata-highlighted'' (present only while the condition holds)
branchdata-indeterminate'' (present only while the condition holds)
branchdata-load-statebranchLoadState(value)?.status
branchdata-loading'' (present only while the condition holds)
branchdata-selected'' (present only while the condition holds)
branchdata-state'open' | 'closed'
branch-controldata-disabled'' (present only while the condition holds)
branch-controldata-draggable'' (present only while the condition holds)
branch-controldata-dragging'' (present only while the condition holds)
branch-controldata-drop'before' | 'after' | 'inside'
branch-controldata-highlighted'' (present only while the condition holds)
branch-controldata-indeterminate'' (present only while the condition holds)
branch-controldata-pressed'' (present only while the condition holds)
branch-controldata-selected'' (present only while the condition holds)
branch-controldata-state'open' | 'closed'
branch-controldata-tonemetaOf(value)?.tone
branch-controldata-xh-collection-context'overlay'
branch-controldata-xh-collection-item''
branch-controldata-xh-collection-sizeprops.size
branch-triggerdata-disabled'' (present only while the condition holds)
branch-triggerdata-highlighted'' (present only while the condition holds)
branch-triggerdata-indeterminate'' (present only while the condition holds)
branch-triggerdata-selected'' (present only while the condition holds)
branch-triggerdata-state'open' | 'closed'
branch-triggerdata-xh-collection-slot'prefix'
branch-indicatordata-disabled'' (present only while the condition holds)
branch-indicatordata-highlighted'' (present only while the condition holds)
branch-indicatordata-indeterminate'' (present only while the condition holds)
branch-indicatordata-selected'' (present only while the condition holds)
branch-indicatordata-state'open' | 'closed'
branch-indicatordata-xh-collection-slot'prefix'
branch-textdata-disabled'' (present only while the condition holds)
branch-textdata-highlighted'' (present only while the condition holds)
branch-textdata-indeterminate'' (present only while the condition holds)
branch-textdata-selected'' (present only while the condition holds)
branch-textdata-state'open' | 'closed'
branch-textdata-xh-collection-slot'text'
branch-descriptiondata-disabled'' (present only while the condition holds)
branch-descriptiondata-highlighted'' (present only while the condition holds)
branch-descriptiondata-indeterminate'' (present only while the condition holds)
branch-descriptiondata-selected'' (present only while the condition holds)
branch-descriptiondata-state'open' | 'closed'
branch-descriptiondata-xh-collection-slot'description'
branch-contentdata-disabled'' (present only while the condition holds)
branch-contentdata-highlighted'' (present only while the condition holds)
branch-contentdata-indeterminate'' (present only while the condition holds)
branch-contentdata-orientation'horizontal' | 'vertical'
branch-contentdata-selected'' (present only while the condition holds)
branch-contentdata-state'open' | 'closed'
branch-loadingdata-disabled'' (present only while the condition holds)
branch-loadingdata-empty'' (present only while the condition holds)
branch-loadingdata-error'' (present only while the condition holds)
branch-loadingdata-highlighted'' (present only while the condition holds)
branch-loadingdata-indeterminate'' (present only while the condition holds)
branch-loadingdata-load-statebranchLoadState(value)?.status
branch-loadingdata-loading'' (present only while the condition holds)
branch-loadingdata-selected'' (present only while the condition holds)
branch-loadingdata-state'open' | 'closed'
branch-loadingdata-xh-loading-ring''
branch-errordata-disabled'' (present only while the condition holds)
branch-errordata-empty'' (present only while the condition holds)
branch-errordata-error'' (present only while the condition holds)
branch-errordata-highlighted'' (present only while the condition holds)
branch-errordata-indeterminate'' (present only while the condition holds)
branch-errordata-load-statebranchLoadState(value)?.status
branch-errordata-selected'' (present only while the condition holds)
branch-errordata-state'open' | 'closed'
branch-retry-triggerdata-disabled'' (present only while the condition holds)
branch-retry-triggerdata-empty'' (present only while the condition holds)
branch-retry-triggerdata-error'' (present only while the condition holds)
branch-retry-triggerdata-highlighted'' (present only while the condition holds)
branch-retry-triggerdata-indeterminate'' (present only while the condition holds)
branch-retry-triggerdata-load-statebranchLoadState(value)?.status
branch-retry-triggerdata-selected'' (present only while the condition holds)
branch-retry-triggerdata-state'open' | 'closed'
branch-emptydata-disabled'' (present only while the condition holds)
branch-emptydata-empty'' (present only while the condition holds)
branch-emptydata-error'' (present only while the condition holds)
branch-emptydata-highlighted'' (present only while the condition holds)
branch-emptydata-indeterminate'' (present only while the condition holds)
branch-emptydata-load-statebranchLoadState(value)?.status
branch-emptydata-selected'' (present only while the condition holds)
branch-emptydata-state'open' | 'closed'
node-drag-triggerdata-disabled'' (present only while the condition holds)
node-drag-triggerdata-dragging'' (present only while the condition holds)
node-drag-triggerdata-xh-collection-slot'prefix'
emptydata-disabled'' (present only while the condition holds)
loadingdata-disabled'' (present only while the condition holds)
loadingdata-loading'' (present only while the condition holds)
loadingdata-xh-loading-ring''

CSS variables ​

The public override slots, generated from what the standalone skin actually consumes.

VariablePartCSS propertyStateDefault from
--xh-tree-bgroot
tree
backgrounddefault
variant=subtle
--xh-bg-subtle
--xh-bg-surface
--xh-tree-bordertreeborderdefault--xh-border-default
--xh-tree-branch-content-gapbranch
branch-content
branch-control
item
tree
background
gap
inset-block
row-gap
default
lines
not(:last-child)
orientation=horizontal
orientation=vertical
--xh-space-0
--xh-tree-branch-error-fgbranch-errorbackground-colordefault--xh-fg-danger
--xh-tree-branch-gapbranch
branch-content
branch-control
item
tree
background
gap
inset-block
default
first-child
lines
orientation=vertical
state=open
--xh-space-0
--xh-tree-branch-indicator-fgbranch-indicator
branch-trigger
colordefault--xh-fg-muted
--xh-tree-branch-loading-fgbranch
branch-control
branch-indicator
branch-trigger
colorloading--xh-fg-brand
--xh-tree-branch-retry-fgbranch-retry-triggercolordefault--xh-fg-brand
--xh-tree-branch-status-fgbranch-empty
branch-error
branch-loading
coloris([data-part='branch-loading'], [data-part='branch-empty'], [data-part='branch-error'])--xh-fg-muted
--xh-tree-branch-status-font-sizebranch-empty
branch-error
branch-loading
branch-retry-trigger
font-sizedefault
is([data-part='branch-loading'], [data-part='branch-empty'], [data-part='branch-error'])
--xh-_tree-font-size
--xh-tree-branch-status-pybranch-empty
branch-error
branch-loading
padding-blockis([data-part='branch-loading'], [data-part='branch-empty'], [data-part='branch-error'])--xh-_tree-row-py
--xh-tree-drag-fgnode-drag-triggercolordefault--xh-fg-subtle
--xh-tree-drag-fg-activenode-drag-triggercolordisabled
dragging
hover
not([data-disabled])
--xh-fg-default
--xh-tree-drag-fg-disablednode-drag-triggercolordisabled--xh-fg-disabled
--xh-tree-drag-grip-longnode-drag-triggerinline-sizeempty--xh-space-2
--xh-tree-drag-grip-shortnode-drag-triggerblock-sizeempty--xh-space-1
--xh-tree-drag-radiusnode-drag-triggerborder-radiusdefault--xh-shape-control
--xh-tree-drag-sizenode-drag-triggerblock-size
inline-size
default--xh-_tree-indicator
--xh-tree-dragging-opacitybranch-control
item
opacitydragging--xh-state-dragging-opacity
--xh-tree-drop-fgbranch-control
item
background
box-shadow
disabled
drop=after
drop=before
drop=inside
is([data-drop='before'], [data-drop='after'])
not([data-disabled])
--xh-bg-brand
--xh-tree-drop-inside-bgbranch-control
item
backgrounddisabled
drop=inside
not([data-disabled])
--xh-bg-subtle-hover
--xh-tree-drop-linebranch-control
item
block-size
box-shadow
disabled
drop=after
drop=before
drop=inside
is([data-drop='before'], [data-drop='after'])
not([data-disabled])
--xh-stroke-thick
--xh-tree-empty-fgemptycolordefault--xh-fg-muted
--xh-tree-empty-font-sizeemptyfont-sizedefault--xh-_tree-font-size
--xh-tree-empty-pxemptypadding-inlinedefault--xh-_tree-row-px
--xh-tree-empty-pyemptypadding-blockdefault--xh-space-3
--xh-tree-fgtreecolordefault--xh-fg-default
--xh-tree-gaprootgapdefault--xh-space-2
--xh-tree-icon-sizebranch-control
item
root
--xh-icon-sizedefault
size=lg
size=sm
--xh-_collection-glyph-size
--xh-glyph-size-lg
--xh-glyph-size-md
--xh-glyph-size-sm
--xh-tree-indentbranch
branch-content
branch-control
branch-empty
branch-error
branch-loading
branch-retry-trigger
item
tree
inline-size
inset-inline-start
margin-inline-start
padding-inline
padding-inline-start
default
is([data-part='branch-loading'], [data-part='branch-empty'], [data-part='branch-error'])
lines
not(:last-child)
orientation=vertical
--xh-_tree-indent
--xh-tree-indicator-sizebranch
branch-content
branch-control
branch-description
branch-indicator
branch-trigger
item
item-indicator
tree
--xh-icon-size
inline-size
inset-inline-start
padding-inline-start
default
has(> [data-scope='tree'][data-part='branch-trigger']:first-child)
lines
not(:last-child)
orientation=vertical
--xh-_tree-indicator
--xh-tree-item-check-fgbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
state=checked
xh-collection-context=overlay
xh-collection-slot=indicator
--xh-tree-item-indicator-fg
--xh-tree-item-indicator-fgbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
state=checked
xh-collection-context=overlay
xh-collection-slot=indicator
--xh-fg-brand
--xh-tree-label-fglabelcolordefault--xh-fg-muted
--xh-tree-label-font-sizelabelfont-sizedefault--xh-text-label-size
--xh-tree-label-font-weightlabelfont-weightdefault--xh-text-label-weight
--xh-tree-leaf-row-gapbranch-contentcolumn-gaporientation=horizontal--xh-space-3
--xh-tree-line-colorbranch
branch-content
branch-control
item
tree
background
border-block-end
border-inline-start
last-child
lines
not(:last-child)
orientation=vertical
--xh-border-default
--xh-tree-loading-fgloadingcolordefault--xh-fg-muted
--xh-tree-loading-font-sizeloadingfont-sizedefault--xh-_tree-font-size
--xh-tree-loading-gaploadinggapdefault--xh-_tree-row-gap
--xh-tree-loading-pxloadingpadding-inlinedefault--xh-_tree-row-px
--xh-tree-loading-pyloadingpadding-blockdefault--xh-space-3
--xh-tree-max-htreemax-block-sizedefault--xh-viewport-h-lg
--xh-tree-pxtreepadding-inlinedefault--xh-space-1
--xh-tree-pytreepadding-blockdefault--xh-space-1
--xh-tree-radiustreeborder-radiusdefault--xh-shape-surface
--xh-tree-row-bg-hoverbranch-control
item
background-colordisabled
error
highlighted
hover
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
selected
xh-collection-context=overlay
--xh-bg-subtle
--xh-tree-row-bg-pressedbranch-control
item
background-colordisabled
error
is(:active, [data-pressed])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-bg-subtle-hover
--xh-tree-row-fgbranch-control
item
colordefault
disabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-fg-default
--xh-tree-row-fg-selectedbranch-control
item
colordisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-tree-row-fg
--xh-tree-row-font-sizebranch-control
item
font-sizedefault--xh-_tree-font-size
--xh-tree-row-gapbranch-control
branch-description
item
gap
padding-inline-start
default
has(> [data-scope='tree'][data-part='branch-trigger']:first-child)
orientation=vertical
--xh-_tree-row-gap
--xh-tree-row-leadingbranch-control
item
line-heightdefault--xh-leading-normal
--xh-tree-row-loading-opacitybranch-control
item
tree
opacityis([data-scope='tree'][data-part='item'], [data-scope='tree'][data-part='branch-control'])
loading
--xh-state-disabled-opacity
--xh-tree-row-pxbranch
branch-content
branch-control
item
tree
inline-size
inset-inline-start
padding-inline
padding-inline-start
default
lines
not(:last-child)
orientation=vertical
--xh-_tree-row-px
--xh-tree-row-pybranch-control
item
padding-blockdefault--xh-_tree-row-py
--xh-tree-row-radiusbranch-control
item
border-radiusdefault--xh-shape-inset
--xh-tree-row-selected-font-weightbranch-control
item
font-weightdisabled
error
highlighted
hover
is(:active, [data-pressed])
is(:focus-visible, [data-highlighted])
is([aria-selected='true'], [data-selected])
not([aria-disabled='true'], [data-disabled], [aria-busy='true'], [data-error])
pressed
selected
xh-collection-context=overlay
--xh-font-weight-regular
--xh-tree-tree-gaptreegapdefault--xh-space-0

Released under The MIT License