Dropdown Menu
Overlayatlas-dropdown-menuExamples
Actions menu
Items are data with optional icons, separators and destructive styling; (selected) reports the item.
Last action: —
Row actions, aligned to the end
An icon-only trigger ( triggerSize="icon" ) needs a triggerAriaLabel . align="end" lines the menu up with the trigger's end edge, which keeps it inside a table or a card.
- report-q3.pdf
- budget.xlsx
Last: —
Custom item content
Give an item a template to render more than an icon and a label, here a description and a keyboard hint. The template receives the item as let-item ; the item's label stays its accessible name source, so keep it in the template.
Last: —
API
Generated from the library source, so it always matches the code.
AtlasDropdownMenuComponent atlas-dropdown-menu
| Input | Type | Default | Description |
|---|---|---|---|
| items required | DropdownMenuEntry[] | — | { type: 'separator' } entries, in display order. |
| align | 'start' | 'end' | 'start' | |
| triggerVariant | ButtonVariants['variant'] | 'outline' | atlasButton variant of the trigger button the component renders around the projected [trigger] content. |
| triggerSize | ButtonVariants['size'] | 'default' | atlasButton size of the trigger button ( icon for an icon-only trigger, then set triggerAriaLabel ). |
| triggerClass | string | '' | cn() . |
| triggerAriaLabel | string | — | aria-label ). Required when the trigger shows only an icon; when it has visible text, start the label with that text so speech input can name it. |
| Output | Payload | Description |
|---|---|---|
| selected | DropdownMenuItem |
Functions
| Function | Description |
|---|---|
| isSeparator(entry: DropdownMenuEntry): entry is DropdownMenuSeparator |
Types
DropdownMenuEntry
type DropdownMenuEntry = DropdownMenuItem | DropdownMenuSeparatorDropdownMenuItem
| Property | Type | Description |
|---|---|---|
| id | string | |
| label | string | |
| icon? | string | |
| disabled? | boolean | |
| destructive? | boolean | |
| template? | TemplateRef<DropdownMenuItemContext> | $implicit (grid-style), e.g. <ng-template #tpl let-item>...{{ item.label }}...</ng-template> . |
DropdownMenuItemContext
template .
| Property | Type | Description |
|---|---|---|
| $implicit | DropdownMenuItem |
DropdownMenuSeparator
| Property | Type | Description |
|---|---|---|
| type | 'separator' |