VerticalNav
Importβ
import { VerticalNav } from '@resultadosdigitais/tangram-components'
Propertiesβ
asβ
| Type | node |
|---|---|
| Default | 'nav' |
Descriptionβ
Set element type to be rendered for this component. By default it will be render a nav element.
childrenβ
| Type | node | func |
|---|---|
| Default | null |
Descriptionβ
Sets the children which usually is a tree of <VerticalNav.Item />
selectedβ
| Type | number | 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β
| Type | number | string |
|---|
Descriptionβ
Sets the item selected passing the item id. Used for Uncontrolled component
expandedβ
| Type | arrayOf(string | number) |
|---|
Descriptionβ
Sets an array of expanded ids item. Used for Controlled component.
defaultExpandedβ
| Type | arrayOf(string | number) |
|---|---|
| Default | [] |
Descriptionβ
Sets an array of expanded ids item. Used for Uncontrolled component
onSelectβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
| Param | id number|string - The id from selected item. |
Descriptionβ
Callback fired when some item is selected. Can be useful for controlled mode.
onExpandβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
| Param | id 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 |
|---|---|
| Type | number | string |
Descriptionβ
Sets the unique identifier for this item, used to handle when selected or expanded.
label πβ
childrenβ
selectedβ
onClickβ
| Type | func |
|---|---|
| Param | event 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'