<nav aria-label="File navigation"><TreeView aria-label="File navigation"><TreeView.Item>src<TreeView.SubTree><TreeView.LinkItem href="#">Avatar.tsx</TreeView.LinkItem><TreeView.Item>Button<TreeView.SubTree><TreeView.LinkItem href="#" current>Button.tsx</TreeView.LinkItem><TreeView.LinkItem href="#">Button.test.tsx</TreeView.LinkItem></TreeView.SubTree></TreeView.Item></TreeView.SubTree></TreeView.Item><TreeView.Item>public<TreeView.SubTree><TreeView.LinkItem href="#">index.html</TreeView.LinkItem><TreeView.LinkItem href="#">favicon.ico</TreeView.LinkItem></TreeView.SubTree></TreeView.Item><TreeView.LinkItem href="#">package.json</TreeView.LinkItem></TreeView></nav>
<nav aria-label="File navigation"><TreeView aria-label="File navigation"><TreeView.LinkItem href="#">src<TreeView.SubTree><TreeView.LinkItem href="#">Avatar.tsx</TreeView.LinkItem><TreeView.LinkItem href="#" current>Button<TreeView.SubTree><TreeView.LinkItem href="#">Button.tsx</TreeView.LinkItem><TreeView.LinkItem href="#">Button.test.tsx</TreeView.LinkItem></TreeView.SubTree></TreeView.LinkItem></TreeView.SubTree></TreeView.LinkItem><TreeView.LinkItem href="#">public<TreeView.SubTree><TreeView.LinkItem href="#">index.html</TreeView.LinkItem><TreeView.LinkItem href="#">favicon.ico</TreeView.LinkItem></TreeView.SubTree></TreeView.LinkItem><TreeView.LinkItem href="#">package.json</TreeView.LinkItem></TreeView></nav>
Name | Type | Default | Description |
---|---|---|---|
children Required | React.ReactNode |
Name | Type | Default | Description |
---|---|---|---|
children Required | React.ReactNode |
Name | Type | Default | Description |
---|
boolean
(event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void
(isExpanded: boolean) => void
Name | Type | Default | Description |
---|---|---|---|
children Required | React.ReactNode | ||
href | string | The URL that the item navigates to. href is passed to the underlying <a> element. If as is specified, the component may need different props. If the item contains a sub-nav, the item is rendered as a <button> and href is ignored. | |
onSelect | (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void | ||
onToggle | (isExpanded: boolean) => void |
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode |