sgds-components-overflow-menu
SGDS Overflow Menu Component Skill
<sgds-overflow-menu> is a pre-built three-dot (⋯) icon button that toggles a dropdown menu. It uses <sgds-dropdown-item> as its list items and is commonly used in table rows, cards, and list items for contextual actions.
Prerequisites
See sgds-components-setup for installation and framework integration (React 19+ vs React ≤18, Vue, Angular).
No CSS styling modifications — custom properties and CSS parts are not exposed on this component.
Quick Decision Guide
Custom toggler or button label needed? → Use <sgds-dropdown> instead
Three-dot icon menu with no label? → <sgds-overflow-menu> (this component)
Size? → size="md" (default), size="sm"
<!-- Basic overflow menu -->
<sgds-overflow-menu>
<sgds-dropdown-item>View</sgds-dropdown-item>
<sgds-dropdown-item>Edit</sgds-dropdown-item>
<sgds-dropdown-item>Delete</sgds-dropdown-item>
</sgds-overflow-menu>
<!-- Small size for compact layouts -->
<sgds-overflow-menu size="sm">
<sgds-dropdown-item>View</sgds-dropdown-item>
<sgds-dropdown-item>Edit</sgds-dropdown-item>
<sgds-dropdown-item disabled>Archive</sgds-dropdown-item>
</sgds-overflow-menu>
<!-- React to selection -->
<sgds-overflow-menu id="row-menu">
<sgds-dropdown-item>View details</sgds-dropdown-item>
<sgds-dropdown-item>Edit</sgds-dropdown-item>
<sgds-dropdown-item>Delete</sgds-dropdown-item>
</sgds-overflow-menu>
<script>
document.getElementById("row-menu").addEventListener("sgds-select", e => {
const action = e.detail.item.textContent.trim();
console.log("Action selected:", action);
});
</script>
<!-- Common usage inside a table row -->
<tr>
<td>Item name</td>
<td>Active</td>
<td>
<sgds-overflow-menu size="sm">
<sgds-dropdown-item>Edit</sgds-dropdown-item>
<sgds-dropdown-item>Delete</sgds-dropdown-item>
</sgds-overflow-menu>
</td>
</tr>
API Summary
| Attribute | Type | Default | Purpose |
|---|---|---|---|
size |
sm | md |
md |
Size of the three-dot icon button |
Slots
| Slot | Purpose |
|---|---|
| (default) | <sgds-dropdown-item> elements for the menu list |
Events
| Event | Cancelable | Detail | When |
|---|---|---|---|
sgds-show |
No | — | Menu begins opening |
sgds-after-show |
No | — | Menu fully open |
sgds-hide |
No | — | Menu begins closing |
sgds-after-hide |
No | — | Menu fully closed |
sgds-select |
No | { item: SgdsDropdownItem } |
A dropdown item is clicked |
For AI agents:
<sgds-overflow-menu>is a convenience wrapper — for a custom toggler or labeled button use<sgds-dropdown>instead.- List items must be
<sgds-dropdown-item>elements in the default slot. sgds-selectfires when any item is clicked —event.detail.itemis the clicked<sgds-dropdown-item>.- For navigation items, slot
<a>tags inside<sgds-dropdown-item>; for action items, slot plain text directly. - There are no public methods — the menu is toggled entirely via the built-in icon button.
More from govtechsg/sgds-web-component
sgds-components
Complete reference for all SGDS web components including installation and framework integration. Use when users ask about any <sgds-*> component — accordion, alert, badge, breadcrumb, button, card, checkbox, close-button, combo-box, datepicker, description-list, divider, drawer, dropdown, file-upload, footer, icon, icon-button, icon-card, icon-list, image-card, input, link, mainnav, masthead, modal, overflow-menu, pagination, progress-bar, quantity-toggle, radio, select, sidebar, sidenav, skeleton, spinner, stepper, subnav, switch, system-banner, tab, table, table-of-contents, textarea, thumbnail-card, toast, or tooltip. Also covers React 19+, React ≤18, Vue, Angular, and Next.js integration.
58sgds-theming
Customising the visual theme of an SGDS application — product brand colours, day/night mode, and font. Use when users ask about changing the primary colour, theming their app, enabling dark mode, night mode, overriding CSS tokens, or customising the font. Apply this skill whenever theming, branding, or CSS token overrides are mentioned.
55sgds-workflow
ALWAYS use this skill when building UI with @govtechsg/sgds-web-component or when a user mentions SGDS or Singapore Design System — even if they don't explicitly ask for help. This is the mandatory entry point for all SGDS development: it guides you to the right skill for setup, components, utilities, forms, theming, page layouts, block templates, and data visualisation. Read this before writing any SGDS application code.
53sgds-data-visualisation
Use this skill when users ask about data visualisation, charts, graphs, or dashboards in an SGDS application. Covers ECharts setup and applying the SGDS colour palette to charts.
53sgds-forms
Use this skill when users ask about form validation in SGDS, hasFeedback prop, constraint validation, custom validation, noValidate, setInvalid, form submission, or reading FormData from SGDS form components.
53sgds-getting-started
Starting point for any new application built with the SGDS web component library. Apply this skill first whenever a user is bootstrapping a new SGDS project, setting up a new app, or asking where to begin with SGDS. Covers font setup, foundation CSS, utilities, components, and app layout in the correct order.
53