Button
ID: mantra_starter:button
Buttons allow the user to take actions or make choices.
| Name | Label | Type | Description |
|---|---|---|---|
label
|
Label | Slot | |
size
|
Size | Enum | It is possible to set the size of buttons. Allowed values: small, medium, large |
display
|
Display | Enum | Block buttons fill the width of their container. Allowed values: inline-block, block |
url
|
URL | Url | The button URL. Optional. |
icon
|
Icon | Unknown | ⚠️ {"properties":{"pack_id":{"type":"string"},"icon_id":{"type":"string"},"settings":{"type":"object"}},"type":"object"} |
icon_position
|
Icon position | Enum | Default: "right" Allowed values: left, right |
icon_only
|
Icon only? | Boolean | Show the icon alone. The label is kept for screen readers, so it still names the button. Has no effect without an icon. Default: false |
Default
Button element
Without a URL the component renders a <button> rather than a link.
Small
Large
Long label
A label long enough to wrap, to check padding and line height.
Disabled
Icon left
Icon right
Icon only
The label is visually hidden and still names the button for screen readers.
Icon only small
Period link
A one-character label: the tap-target minimum width keeps the link wide enough to hit.