LinkButton
Links a page, links a mood.
Example
Props
đšī¸ standard props
disabled boolean
Whether the button is disabled.
falsehref string
The href attribute of the a tag.
prependIcon string | undefined
The prepend icon name.
undefinedappendIcon string | undefined
The append icon name.
undefinedtarget string
The target attribute of the a tag.
undefinedclass string
Additional CSS class for the button.
''đ¨ style props
--link-button-color color
The color of the link button.
rgb(var(--global-color-contrast-900))--link-button-width size
The width of the link button.
fit-content--link-button-height size
The height of the link button.
auto--link-button-font-size size
The font size of the link button.
.875rem--link-button-font-weight number
The font weight of the link button.
500--link-button-line-height size
The line height of the link button.
1.5rem--link-button-padding size
The padding inside the link button.
0.25rem 0.75rem 0.25rem 0.75rem--link-button-background-color color
The background color of the link button.
rgb(var(--global-color-background-300))--link-button-border-radius size
The border radius of the link button.
9999px--link-button-gap size
The gap between elements inside the link button.
.5rem--link-button-hover-background-color color
The background color on hover.
rgb(var(--global-color-background-400))Slots
default
The button content
prepend
The button prepend space
Default content:
{#if !!prependIcon}
<Icon name={prependIcon}></Icon>
{/if}Available variables:
| Name | Type | Description |
|---|---|---|
prependIcon | string | The prependIcon prop. |
append
The button append space
Default content:
{#if !!appendIcon}
<Icon name={appendIcon}></Icon>
{/if}Available variables:
| Name | Type | Description |
|---|---|---|
appendIcon | string | The appendIcon prop. |
Events
onclick
Triggered when the button is clicked.
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | MouseEvent | The native mouse event triggered by the click. |
onkeypress
Triggered when a key is pressed while the button is focused.
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | KeyboardEvent | The native keyboard event triggered by the key press. |