Page History
(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)
Overflow Menu
Link to Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=11600-88110&t=ftfrOGkPzlG2GaTo-1
Overview
- The Dynamic Overflow Menu Component is a dropdown menu usually shown as an icon button.
- When activated, it displays a list of selectable options.
- It is useful for contextual actions, secondary features, or extra options without cluttering the interface.
- The component can be customized with icons, placement options, and menu items.
- It helps keep interfaces clean while still providing access to important functionality.
...
- visibilityPolicySetId – Determines the visibility of the component based on user permissions and policy sets. For example, setting to
"adminOnlyPolicy"restricts the overflow menu to users with admin privileges.
Links
- Figma: https://www.figma.com/design/yck1tcUXgdQ5aYX6iUAwrO/GE---Astronaut-Design-System?node-id=11600-88110&t=ftfrOGkPzlG2GaTo-1
- Live style guide: https://e1-dev.k8s.myapp.de/live-style-guide/id4/2-overflow-menu
Guidelines
Usage
- Use the component to reveal contextual or secondary actions by configuring the trigger icon with
iconNameand the list of items withoptions. - Place the dropdown where it will not obscure the trigger or key content by setting
placementto"bottom","top","right", or"left"according to available space. - Keep actions concise and scannable by writing clear labels in
options[].textand, when recognition helps, enablingoptions[].showMenuLinkIconto pair labels with icons. - Keep menus lightweight by constraining the length of the
optionsarray to a manageable number (for example, around eight) so choices remain easy to scan. - Use side-specific icons consistently by setting
options[].iconPositionKeyto"menuLinkLeftIconName"or"menuLinkRightIconName", and assigningoptions[].menuLinkLeftIconNameoroptions[].menuLinkRightIconNameaccordingly.
...
- Adjust the trigger’s tap/click comfort and breathing room using
paddingClass(for example,"p-1","p-2","p-3") to align visually with nearby controls. - Keep item alignment steady by choosing a single
options[].iconPositionKeyvalue so labels inoptions[].textline up across the list. - Prevent clipping and reduce pointer travel by choosing an appropriate
placementrelative to the trigger using the"top","right","bottom", or"left"values.
States & Feedback
- Run setup logic at creation with
ON_INIT(declared inevents) when the menu should register analytics or prepare context foroptions. - Perform cleanup on teardown with
ON_DESTROY(declared inevents) when initialization attached resources that need removal. - Provide immediate feedback on selection by wiring per-item handlers in
options[].eventssoON_OPTION_CLICKtriggers the intended action flow.
...
| Do | Don’t | Article setting(s) |
|---|---|---|
Use placement="bottom" when the trigger is near the top edge so the menu opens into available space. | Use placement="top" in the same case, causing the menu to clip against the top edge. | placement |
Keep labels short and action-oriented by writing options[].text like “Edit item.” | Use vague options[].text such as “Done,” which obscures intent. | options[].text |
Pair icons with labels by enabling options[].showMenuLinkIcon and setting options[].menuLinkLeftIconName. | Rely on icons without options[].text, reducing clarity. | options[].showMenuLinkIcon, options[].menuLinkLeftIconName |
Confirm risky actions by routing ON_OPTION_CLICK through a confirmation step in options[].events. | Execute destructive actions immediately on ON_OPTION_CLICK without confirmation. | options[].events, ON_OPTION_CLICK |
Keep the menu scannable by limiting the options array to a manageable size. | Overload options with long lists that slow scanning and selection. | options |
Use paddingClass to ensure the trigger has a comfortable hit area next to other controls. | Leave paddingClass unset so the trigger feels cramped or hard to tap. | paddingClass |
Place item icons consistently with options[].iconPositionKey="menuLinkLeftIconName" across all entries. | Mix left and right icon positions arbitrarily, causing alignment jitter. | options[].iconPositionKey |
Accessibility
Protocol of implemented accessibility measures
- Provide explicit, readable action labels with
options[].textso assistive technologies can announce them clearly.- Prefer short, verb-led phrases in
options[].textand avoid jargon to aid screen readers and translation.
- Prefer short, verb-led phrases in
- Avoid meaning by color or icon alone by pairing
options[].showMenuLinkIconwith text labels inoptions[].text. - Reduce occlusion and surprise by selecting a predictable
placementso the dropdown appears where users expect. - Support automated checks and stable selectors by setting
dataTestIdandid. - Improve onboarding comprehension by enabling
enableAsHotspotand supplying descriptiveguidedTourHotSpotTitleandguidedTourHotSpotDescriptionstrings.
Practices to improve accessibility
- Prefer short, verb-led phrases in
options[].textand avoid jargon to aid screen readers and translation. - Keep icon placement consistent using
options[].iconPositionKeyso the reading order remains stable. - Confirm destructive actions via
options[].eventsusingON_OPTION_CLICKto present a confirmation step before the action proceeds. - Ensure consistent placement across similar menus by standardizing
placementwithin a product area.PopulatedataTestIdto integrate automated accessibility tests and regressions in pipelines.