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'