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

# mds-mention

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

The `<mds-mention>` web component renders a compact inline chip that references a person or entity - the kind of token produced when you type `@name` in an editor or comment field. It pairs an icon, a text label, and a removable action into a single self-contained pill.

#### Semantic Behavior

- **Props-only**: It has no default slot and exposes its content exclusively through props.
- **Default icon**: When `icon` is not set the component falls back to the `alternate-email` (`@`) glyph, reinforcing the mention metaphor.
- **Opt-in remove affordance**: `deletable` adds a trailing remove button; its click emits `mdsMentionDelete`, and the component leaves the removal itself to the application.
- **Size-driven typography**: `size` maps to a fixed typography ramp (`sm` -> `caption`, `md` -> `detail`, `lg` -> `h6`); the label is wrapped in `<b>` at `sm` and `md`, and at `lg` it takes the bold `h6` title style.

#### Properties & Visual Configurations

- **`deletable`** turns on the trailing remove button. Without it the mention is a read-only token: no button, no event.
- **`icon`** is an SVG filename slug from the Magma icon library, shown at the left of the label; omit it to keep the default `@` mention glyph.
- **`size`** controls both the physical scale and the typography of the label - pick `sm` for dense inline contexts, `lg` for prominent, headline-adjacent placements. The label is bold at every size (a `<b>` below `lg`, the `h6` title style at `lg`).

## 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-mention--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 |
| --- | --- | --- | --- | --- |
| `deletable` | `deletable` | `boolean \| undefined` | - | Shows the cross icon to perform cancel/delete action on element |
| `icon` | `icon` | `string \| undefined` | - | Sets the icon shown at the left of the label |
| `label` | `label` | `string \| undefined` | - | Sets the label of the component |
| `size` | `size` | `"lg" \| "md" \| "sm" \| undefined` | `'sm'` | Sets the size of the component: the typography of the label (`sm` caption, `md` detail, `lg` h6) and the size of the icon |

## Events

| Event | Detail | Description |
| --- | --- | --- |
| `mdsMentionDelete` | `MdsMentionEvent` | Emits when the component's delete button is clicked |

## CSS custom properties

None is public: its custom property is internal and may change in any release. Style it with its props, its parts and the semantic roles.

## Dependencies

Uses: `mds-icon`, `mds-text`, `mds-button`.
