Current section

Files

Jump to
noora docs components dropdownitem.md
Raw

docs/components/dropdownitem.md

<!-- Generated by scripts/generate-web-components.js. Do not edit directly. -->
# DropdownItem
Describes one declarative item inside a dropdown or breadcrumb menu.
```html
<noora-dropdown-item value="edit" icon="edit">Edit</noora-dropdown-item>
```
## Attributes
| Attribute | Type or allowed values | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `""` | Sets the item label instead of using its text content. |
| `value` | `string` | None | Sets the value emitted when the item is selected. |
| `icon` | `string` | None | Shows an icon before the label. |
| `right-icon` | `string` | None | Shows an icon after the label. |
| `size` | `small`, `large` | `"small"` | Controls the item dimensions. |
| `href` | `string` | None | Renders the item as a link. |
| `secondary-text` | `string` | None | Adds compact secondary text beside the label. |
| `description` | `string` | None | Adds supporting text below the label. |
| `disabled` | `boolean` | `false` | Disables selection. |
| `checkable` | `boolean` | `false` | Shows a checkbox indicator. |
| `checked` | `boolean` | `false` | Marks a checkable item as selected. |
| `selected` | `boolean` | `false` | Marks a breadcrumb menu item as selected. |
| `avatar` | `boolean` | `false` | Shows an avatar before the label. |
| `avatar-name` | `string` | None | Sets the avatar name. |
| `avatar-color` | `string` | None | Sets the avatar color. |
| `avatar-image-href` | `string` | None | Sets the avatar image address. |
| `badge-label` | `string` | None | Shows a badge with this label. |
| `badge-color` | `string` | None | Sets the badge color. |
## Slots
| Slot | Description |
| --- | --- |
| `default` | The item label. |
Use this element inside noora-dropdown, noora-inline-dropdown, noora-button-dropdown, or noora-breadcrumb-item.
## Item
Describe a selectable menu item.
```html
<noora-dropdown-item value="edit" icon="edit">Edit</noora-dropdown-item>
```