Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or command menus, where an action is initiated based on the selection.
Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or command menus, where an action is initiated based on the selection.
Supports any variant available in <certara-button>
disabled
Attribute
disabled
Type
boolean
Default
false
Required
false
Description
Will disable the dropdown opener button
menuOffset
Attribute
menu-offset
Type
number
Default
4
Required
false
Description
Separation from the opener to the menu (depends on orientation)
nested
Attribute
nested
Type
boolean
Default
false
Required
false
Description
Specify that a nested dropdown can act as a submenu item of a containing dropdown
open
Attribute
open
Type
boolean
Default
false
Required
false
Description
Renders the dropdown with its menu already open, and stays in sync with user interaction: opening or closing the menu updates this value. Intended for documentation examples and tests. For programmatic control at runtime, prefer show() / hide() / toggle(). A menu opened this way is not dismissed by clicking elsewhere on the page — close it via hide() or the opener button.
These options will suggest a starting point for the menu position, but <certara-dropdown> will automatically position itself within the viewport to avoid appearing offscreen
position
Attribute
position
Type
"absolute" | "fixed"
Default
'absolute'
Required
false
Description
This can be set to fixed if the dropdown menu is clipped by a bounding parent element
showOpenerCaret
Attribute
show-opener-caret
Type
boolean
Default
true
Required
false
Description
If set to false, the dropdown opener will not show a caret icon
Dropdown menus are typically used when you have 5-15 items to choose from. They’re used for navigation or command menus, where an action is initiated based on the selection.
<certara-dropdown> will position the menu automatically to stay within the viewport, but can be set to show in a specific orientation with the placement attribute.
"aria-labelledby" allows a developer to associate the dropdown menu (aria-labelledby=“dropdownTrigger”) to the element that triggers it (id=“dropdownTrigger”). This allows the dropdown trigger to be not only visually associated with its corresponding dropdown menu; it is programmatically associated with it too. This means that, for example, a screen reader will read out the dropdown trigger when the user is focused on the button, making it easier for an assistive technology user to understand what menu the button/trigger is controlling.