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'