Current section

Files

Jump to
noora docs components linkbutton.md
Raw

docs/components/linkbutton.md

<!-- Generated by scripts/generate-web-components.js. Do not edit directly. -->
# LinkButton
Presents a text-oriented button or link.
```html
<noora-link-button href="/docs" label="Documentation"></noora-link-button>
```
## Attributes
| Attribute | Type or allowed values | Default | Description |
| --- | --- | --- | --- |
| `label` | `string` | `""` | Sets the visible label. |
| `variant` | `primary`, `secondary`, `destructive` | `"primary"` | Controls semantic emphasis. |
| `size` | `small`, `medium`, `large` | `"large"` | Controls dimensions. |
| `href` | `string` | None | Renders a native link to this location. |
| `underline` | `boolean` | `false` | Underlines the label. |
| `disabled` | `boolean` | `false` | Disables activation. |
## Slots
| Slot | Description |
| --- | --- |
| `icon-left` | An icon before the label. |
| `icon-right` | An icon after the label. |
## Styling parts
| Part | Description |
| --- | --- |
| `control` | The native link or button. |
## Variant
Match the LiveView primary, secondary, and destructive variations.
```html
<noora-link-button href="#" label="Primary" variant="primary"></noora-link-button>
<noora-link-button href="#" label="Secondary" variant="secondary"></noora-link-button>
<noora-link-button href="#" label="Destructive" variant="destructive"></noora-link-button>
```
## Size
Match the LiveView large, medium, and small variations.
```html
<noora-link-button href="#" label="Large" size="large"></noora-link-button>
<noora-link-button href="#" label="Medium" size="medium"></noora-link-button>
<noora-link-button href="#" label="Small" size="small"></noora-link-button>
```
## Disabled
Disable the primary link button.
```html
<noora-link-button label="Disabled" variant="primary" disabled></noora-link-button>
```
## Underline
Render an underlined link button.
```html
<noora-link-button href="#" label="Underline" underline></noora-link-button>
```
## Icon
Match the LiveView left, right, and two-sided icon variations.
```html
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-left" name="chevron_left"></noora-icon></noora-link-button>
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-right" name="chevron_right"></noora-icon></noora-link-button>
<noora-link-button href="#" label="Icon"><noora-icon slot="icon-left" name="chevron_left"></noora-icon><noora-icon slot="icon-right" name="chevron_right"></noora-icon></noora-link-button>
```