Skip to main content

VerticalNav

Import​

import { VerticalNav } from '@resultadosdigitais/tangram-components'

Properties​

as​

Typenode
Default'nav'

Description​

Set element type to be rendered for this component. By default it will be render a nav element.

children​

Typenode | func
Defaultnull

Description​

Sets the children which usually is a tree of <VerticalNav.Item />

selected​

Typenumber | string

Description​

Sets the item selected passing the item id. Used for Controlled component.

Set to an empty string '' if you don't want any of the available item to be selected.

defaultSelected​

Typenumber | string

Description​

Sets the item selected passing the item id. Used for Uncontrolled component

expanded​

TypearrayOf(string | number)

Description​

Sets an array of expanded ids item. Used for Controlled component.

defaultExpanded​

TypearrayOf(string | number)
Default[]

Description​

Sets an array of expanded ids item. Used for Uncontrolled component

onSelect​

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.
Paramid number|string - The id from selected item.

Description​

Callback fired when some item is selected. Can be useful for controlled mode.

onExpand​

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.
Paramid number|string - The id from expanded item.

Description​

Callback fired when some item is expanded. Can be useful for controlled mode.

<VerticalNavItem />​

Import​

import { VerticalNavItem } from '@resultadosdigitais/tangram-components'

Properties​

id πŸ“β€‹

Concerns
πŸ“ Required
Typenumber | string
Description​

Sets the unique identifier for this item, used to handle when selected or expanded.

label πŸ“β€‹

Concerns
πŸ“ Required
Typenode
Description​

Sets the label.

children​

Typenode
Defaultnull
Description​

Sets the children.

selected​

Typebool
Defaultfalse
Description​

Sets the item as selected.

onClick​

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.
Description​

Callback fired when item is clicked or on key down event.

<VerticalNavItemLabel />​

Import​

import { VerticalNavItemLabel } from '@resultadosdigitais/tangram-components'

Properties​

label πŸ“β€‹

Concerns
πŸ“ Required
Typestring
Description​

Sets the label.

Feedback​