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'