<!--
  GENERATED FILE - do not edit by hand.
  Source of truth: src/components/mds-radial-menu/ in the magma monorepo (usage/*.md and the
  component's JSDoc). Regenerated on every stencil build (scripts/component-docs.ts).
-->

# mds-radial-menu

> `@maggioli-design-system/magma` 2.15.0. Shadow DOM: style it only through the public CSS custom properties and the parts below.

The `<mds-radial-menu>` web component is a floating action menu of the Magma Design System that arranges its child items along a circular arc around a central trigger button, expanding them outward when opened. It is the parent of a compound pair: it owns the trigger and the geometry, while each option is supplied as an `<mds-radial-menu-item>` in the `item` slot.

#### Semantic Behavior

- **Trigger button**: Renders a trigger button whose `tone`, `variant` and `size` are forwarded from the host; clicking it toggles the menu open and closed. It is icon-only and named in the page language (the `lang` of `<html>`) after what a click does: "Open menu", then "Close menu". There is no prop to give it a name of your own yet.
- **Open state**: `opened` is the source of truth for visibility; when set the items animate out along the arc and the trigger icon swaps to a close glyph.
- **Interaction mode**: With `interaction="rightclick"` the trigger is hidden and the menu instead opens on right-click, centred on the cursor.
- **Closing**: A click outside the menu or Escape closes the open menu; Escape gives the focus back to the trigger when it was inside the menu.
- **Backdrop**: When `backdrop` is enabled a dimming overlay is shown while the menu is open. It is purely visual: it lets clicks through.
- **Item registration**: Items are read from the `item` slot; the component assigns each item's position and propagates the host `size` down to every `<mds-radial-menu-item>`.

#### Properties & Visual Configurations

The internal trigger consumes the shared `variant` / `tone` / `size` ladders defined in [`agents/variants.md`](../../../../agents/variants.md); they default to `'dark'` / `'strong'` / `'lg'` here.

#### Other behavioral props

- **`angleStart`** and **`angleEnd`** define the angular sweep (in degrees) over which items are distributed; a 360-degree span produces a full ring, while a narrower range produces a fan. Setting `angleStart` greater than `angleEnd` reverses the distribution. Unset, the sweep is a full ring from `0deg`.
- **`radius`** sets the distance (in `rem`) of the items from the centre, controlling how far they travel when the menu opens. Unset, it leaves it to `--mds-radial-menu-radius` (`5rem` by default).
- **`direction`** chooses whether items lay out `'clockwise'` or `'counterclockwise'` around the arc.
- **`interaction`** selects how the menu is summoned: `'click'` shows the trigger button, `'rightclick'` hides it and opens at the cursor.
- **`disc`** renders a decorative disc beneath the menu; **`icon`** overrides the default trigger glyph and defaults to the "more-vert" Material icon when unset.

## Read next

- [`examples.md`](examples.md) - correct usage, from the most common case
- [`mistakes.md`](mistakes.md) - the wrong forms, each with the right one
- [Storybook](https://magma-design-system.github.io/magma/storybook/?path=/docs/ui-radial-menu--docs) - the live examples, in the published Storybook of `main`
- [`conventions.md`](../../../../agents/conventions.md), [`variants.md`](../../../../agents/variants.md), [`mistakes.md`](../../../../agents/mistakes.md) - the rules shared by every component

## Props

| Prop | Attribute | Type | Default | Description |
| --- | --- | --- | --- | --- |
| `angleEnd` | `angle-end` | `number` | - | Specifies the ending angle of the menu, in degrees; when it is not set the menu takes `--mds-radial-menu-angle-end`, `360deg` by default |
| `angleStart` | `angle-start` | `number` | - | Specifies the starting angle of the menu, in degrees; when it is not set the menu takes `--mds-radial-menu-angle-start`, `0deg` by default |
| `backdrop` | `backdrop` | `boolean \| undefined` | `false` | Specifies if the component has a backdrop background |
| `direction` | `direction` | `"clockwise" \| "counterclockwise"` | `'clockwise'` | Specifies the direction of the menu elements |
| `disc` | `disc` | `boolean \| undefined` | - | Specifies if the menu has a disc beneath or not |
| `icon` | `icon` | `string \| undefined` | - | The icon displayed in the button |
| `interaction` | `interaction` | `"click" \| "rightclick"` | `'click'` | Specifies how to open the menu |
| `opened` | `opened` | `boolean \| undefined` | - | Specifies if the menu is opened or not |
| `radius` | `radius` | `number` | - | Specifies the radius of the menu, in `rem`; when it is not set the menu takes `--mds-radial-menu-radius`, `5rem` by default |
| `size` | `size` | `"lg" \| "md" \| "sm" \| "xl"` | `'lg'` | Specifies the size for the button |
| `tone` | `tone` | `"outline" \| "strong" \| "text" \| "weak" \| undefined` | `'strong'` | Specifies the tone variant for the button |
| `variant` | `variant` | `"ai" \| "apple" \| "dark" \| "error" \| "google" \| "info" \| "light" \| "primary" \| "secondary" \| "success" \| "warning" \| undefined` | `'dark'` | Specifies the color variant for the button |

## Slots

| Slot | Description |
| --- | --- |
| `item` | Add `mds-radial-menu-item` elements or `components` to this slot. |

## Parts

| Part | Description |
| --- | --- |
| `radial-menu` | The ring that lays out the `item` slot around the trigger |

## CSS custom properties

| Property | Description |
| --- | --- |
| `--mds-radial-menu-context-menu-z-index` | Z-index of the radial menu context. |
| `--mds-radial-menu-disc-size` | Size of the radial menu disc. |
| `--mds-radial-menu-radius` | Radius of the radial menu; the `radius` prop, when set, wins over it. |

Only these are public. Its other 9 are internal: they may change in any release, do not set them.

## Dependencies

Uses: `mds-button`.
