DropdownMenu ποΈ
This component is deprecated. Use the Dropdown component instead. If you need any help with the migration, take a look in our migration guide.
Importβ
import { DropdownMenu } from '@resultadosdigitais/tangram-components'
Propertiesβ
children πβ
idβ
| Type | string | number |
|---|
Descriptionβ
Responsible to connect accessibly DropdownMenu.List with DropdownMenu.Trigger. The id value is used in aria-labelledby.
defaultOpenβ
onToggleβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
| Param | newOpenState boolean - The open new state. |
Descriptionβ
Callback fired when DropdownMenu.Trigger component is clicked or using accessible keyboard navigation to close DropdownMenu.List with ESC.
onSelectβ
| Type | func |
|---|---|
| Param | event React.SyntheticEvent - The event source of the callback. |
Descriptionβ
Callback fired when DropdownMenu.Item is clicked.
positionβ
| Type | Enum of: |
|---|---|
| Default | DropdownMenu.positions.bottomStart |
Descriptionβ
Determines the direction and location of the DropdownMenu.List in relation to DropdownMenu.Trigger.
offsetβ
| Type | number | string |
|---|
Descriptionβ
Sets the distance between Dropdown and trigger. Use as a number or a string with unit px.
<DropdownMenuDivider /> ποΈβ
Use `<Dropdown.Divider />` instead
Importβ
import { DropdownMenuDivider } from '@resultadosdigitais/tangram-components'
<DropdownMenuItem /> ποΈβ
Use `<Dropdown.Item />` instead.
Importβ
import { DropdownMenuItem } from '@resultadosdigitais/tangram-components'
Propertiesβ
asβ
| Type | elementType |
|---|---|
| Default | 'a' |
Descriptionβ
Set element type to be rendered for this component. By default it will be render a <a> element.
selectedβ
disabledβ
childrenβ
onClickβ
<DropdownMenu.List /> ποΈβ
Use `<Dropdown />` instead.
Importβ
import { DropdownMenu.List } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
<DropdownMenuTitle /> ποΈβ
Use `<Dropdown.Title />` instead
Importβ
import { DropdownMenuTitle } from '@resultadosdigitais/tangram-components'
Propertiesβ
childrenβ
<DropdownMenu.Trigger /> ποΈβ
Use `<Dropdown />` instead
Importβ
import { DropdownMenu.Trigger } from '@resultadosdigitais/tangram-components'