Skip to content

EnDropdown

Preview

Props

NameDescriptionDefaultControl
qaId

Id that can be set for automation selectors.

string
""
disabled

Disables the toggle.

boolean
false
tag

Root element of the component. Use 'span' to make it inline.

string
"div"
toggleClass

Sets CSS class for the toggle. Can be used to add icon and button styles to the toggle.

string
""
dots

Defaults the toggle to the three vertical dots.

boolean
false
menuItems

Array of items in the dropdown's content. Alternatively, the dropdown slot can be used.

unknown[]
unknown
position

The horizontal position of the dropdown menu relative to its toggle.

string
"right"
dropdownTag

Type of element to use for the dropdown container. Use 'div' if not using <li> inside the dropdown.

string
"ul"
toggleTag

Type of element to use for the toggle.

string
"a"
toggleText

Sets the text inside the toggle.

string
""
closeOnClick

Closes the dropdown when an item inside the dropdown is clicked.

boolean
false
maxHeight

Maximum height for the dropdown container before a scroll bar appears. A number type value will convert to px; string type must include unit value.

string | number
null

Slots

toggle

No description

dropdown

No description

Events

opened

Opened event.

closed

Closed event.

Methods

NameDescription
toggleDropdown

Opens the dropdown, open / closed

openDropdown

Opens the dropdown.

closeDropdown

Closes the dropdown.

Examples

Dots

Slots

Checkboxes & Radios