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

# mds-note

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

The `<mds-note>` web component is the annotation surface of the Magma Design System: a short, colored sticky-note block used to attach a remark, reminder, or callout to surrounding content. It has no native HTML primitive - it renders as a semantic note region with an optional title and a decorative folded corner.

#### Semantic Behavior

- **Note role**: Exposed to assistive technology as a standalone annotation (`role="note"`) regardless of theme or variant.
- **Deletable mode**: When `deletable` is set, the component renders an embedded close button; activating it emits the delete event without removing the note itself, leaving the host application in control of dismissal.
- **Delete event**: `mdsNoteDelete` fires when the close control is activated, signalling intent to cancel or remove the note.
- **Keyboard handling**: While `deletable`, the close action is keyboard-reachable.
- **Localized close label**: The close button's accessible title is resolved in the active language (el/en/es/it).
- **Title vs. body slots**: The named `title` slot holds the note heading; the default slot holds the note body text, HTML, or nested components.

#### Properties & Visual Configurations

- **`deletable`** turns the note from a static annotation into a dismissible one by exposing the close control and its delete event; pick it only when the consuming application is prepared to handle `mdsNoteDelete`.

#### Component-specific variants and tones

`<mds-note>` does **not** use the shared `tone` / `variant` ladders from [`agents/variants.md`](../../../../agents/variants.md). Instead, its `variant` prop selects a flat **color palette** for the note paper (the `ThemeLabelVariantType` set, e.g. `'yellow'`, `'blue'`, `'green'`, `'red'`), defaulting to `'yellow'`. Choose the color to convey the note's category, not a state or a hierarchy of emphasis: a label color never communicates state, for a warning or an error use [`mds-banner`](../mds-banner/AGENTS.md).

## 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-note--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` | `false` | Enables the cross icon to perform cancel/delete action on element |
| `variant` | `variant` | `"amaranth" \| "aqua" \| "blue" \| "green" \| "lime" \| "orange" \| "orchid" \| "purple" \| "red" \| "sky" \| "violet" \| "yellow" \| undefined` | `'yellow'` | Specifies the color variant for the element |

## Events

| Event | Detail | Description |
| --- | --- | --- |
| `mdsNoteDelete` | `void` | Emits when the note has to be cancelled |

## Slots

| Slot | Description |
| --- | --- |
| (default) | Add `text string`, `HTML elements` or `components` to this slot. |
| `title` | Add `text string`, `HTML elements` or `components` to this slot. |

## CSS custom properties

| Property | Description |
| --- | --- |
| `--mds-note-background` | Sets the background-color of the component |
| `--mds-note-color` | Sets the text color of the component |

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

## Dependencies

Uses: `mds-button`.
