Skip to main content

Dropdown Menu

Rocket 2.0

The Dropdown Menu component is a button that opens a list of actions, such as Edit, Duplicate or Delete. Use it to group row or record actions without crowding the page.

Properties​

Property
Description
Expected Value
LabelText on the button. With an icon trigger, it becomes the button's tooltip.Text. Default: Actions
TriggerButton shows a labeled button; Icon shows a square icon-only button.Button, Icon. Default: Button
VariantLook of the button. Destructive is red; Link looks like a text link.Default, Secondary, Outline, Ghost, Destructive, Link. Default: Outline
SizeHeight and text size of the button.Sm, Default, Lg. Default: Default
Trigger icon (Tabler name, e.g. IconDots)Icon shown on the button. With an icon trigger and no icon set, a three-dot icon is shown.Text
Show chevronShows a down arrow after the label.On or off. Default: On
Full widthMakes the button fill the width of its box.On or off. Default: Off
ItemsThe menu entries. Each can have a label, value, icon, description, shortcut text, a separator above it, a group heading, and can be disabled, hidden or marked as destructive.Array
Menu headingA heading shown at the top of the menu.Text
Menu alignHow the menu lines up with the button: at its start, center or end.Start, Center, End. Default: Start
Menu sideWhich side of the button the menu opens on.Bottom, Top, Right, Left. Default: Bottom
Options loading stateShows placeholder lines in the menu instead of the items, for example while a query loads them.On or off. Default: Off

Additional Actions​

Each of these can be switched on or off, or set with a logical expression by clicking fx.

Property
Description
Expected Value
VisibilityShows or hides the component. Hidden components keep their space unless Collapse when hidden is on.On or off. Default: On
Collapse when hiddenRemoves the hidden component's space, so the components below it move up.On or off. Default: Off
Loading stateShows the component's loading look and blocks interaction, for example while a query runs.On or off. Default: Off
DisableStops the user from interacting with the component.On or off. Default: Off

Devices​

Property
Description
Expected Value
Show on desktopShows the component in the desktop layout.On or off. Default: On
Show on mobileShows the component in the mobile layout.On or off. Default: Off

Events​

Add a handler from the Events section of the properties panel. See Event Triggers for the steps.

Event
Description
On selectTriggers when the user clicks a menu item.
On openTriggers when the menu opens.
On closeTriggers when the menu closes.

Component Specific Actions (CSA)​

Run these from an event handler with Control Component, or from a RunJS query. See Component Specific Actions.

Action
Description
How To Access
OpenOpens the menu.components.dropdownmenu1.open()
CloseCloses the menu.components.dropdownmenu1.close()
Set visibilityShows the component when true, hides it when false.components.dropdownmenu1.setVisibility(false)
Set disableDisables the component when true, enables it when false.components.dropdownmenu1.setDisable(false)
Set loadingTurns the loading state on with true, off with false.components.dropdownmenu1.setLoading(false)

Exposed Variables​

Variable
Description
How To Access
labelText on the button. With an icon trigger, it becomes the button's tooltip.{{components.dropdownmenu1.label}}
triggerTypeButton shows a labeled button; Icon shows a square icon-only button.{{components.dropdownmenu1.triggerType}}
variantLook of the button. Destructive is red; Link looks like a text link.{{components.dropdownmenu1.variant}}
sizeHeight and text size of the button.{{components.dropdownmenu1.size}}
triggerIconIcon shown on the button. With an icon trigger and no icon set, a three-dot icon is shown.{{components.dropdownmenu1.triggerIcon}}
showChevronShows a down arrow after the label.{{components.dropdownmenu1.showChevron}}
fullWidthMakes the button fill the width of its box.{{components.dropdownmenu1.fullWidth}}
itemsThe menu entries. Each can have a label, value, icon, description, shortcut text, a separator above it, a group heading, and can be disabled, hidden or marked as destructive.{{components.dropdownmenu1.items}}
menuLabelA heading shown at the top of the menu.{{components.dropdownmenu1.menuLabel}}
alignHow the menu lines up with the button: at its start, center or end.{{components.dropdownmenu1.align}}
sideWhich side of the button the menu opens on.{{components.dropdownmenu1.side}}
optionsLoadingStateShows placeholder lines in the menu instead of the items, for example while a query loads them.{{components.dropdownmenu1.optionsLoadingState}}
lastClickedOptionThe menu item the user clicked last, with its label, description and value.{{components.dropdownmenu1.lastClickedOption}}
selectedItemThe value of the menu item the user clicked last.{{components.dropdownmenu1.selectedItem}}
isOpentrue while the menu is open.{{components.dropdownmenu1.isOpen}}
isVisibleWhether the component is visible.{{components.dropdownmenu1.isVisible}}
isLoadingWhether the component is in its loading state.{{components.dropdownmenu1.isLoading}}
isDisabledWhether the component is disabled.{{components.dropdownmenu1.isDisabled}}

Styles​

Style
Default
Trigger backgroundTheme: Surface 1
Trigger hover backgroundTheme: Surface 3
Trigger text colorTheme: Primary text
Trigger border colorTheme: Default border
Trigger radius—
Menu backgroundTheme: Surface 1
Menu border colorTheme: Default border
Item text colorTheme: Primary text
Item hover backgroundTheme: Surface 3
Item hover text colorTheme: Primary text
Item description and shortcut colorTheme: Placeholder text
Item icon colorTheme: Placeholder text
Destructive item colorTheme: Error
Menu radius—
Menu width (px)—
Box shadow0px 0px 0px 0px #00000040

A default that starts with Theme: follows the app's theme until the style is set to another value. See App Themes.