LinkButton

Links a page, links a mood.

Example

Props

    đŸ•šī¸ standard props
    disabled
    boolean
    Whether the button is disabled.
    false
    href
    string
    The href attribute of the a tag.
    prependIcon
    string | undefined
    The prepend icon name.
    undefined
    appendIcon
    string | undefined
    The append icon name.
    undefined
    target
    string
    The target attribute of the a tag.
    undefined
    class
    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:
    NameTypeDescription
    prependIconstringThe prependIcon prop.
    append
    The button append space
    Default content:
    {#if !!appendIcon}
      <Icon name={appendIcon}></Icon>
    {/if}
    Available variables:
    NameTypeDescription
    appendIconstringThe appendIcon prop.

Events

    onclick
    Triggered when the button is clicked.
    AttributeTypeDescription
    nativeEventMouseEventThe native mouse event triggered by the click.
    onkeypress
    Triggered when a key is pressed while the button is focused.
    AttributeTypeDescription
    nativeEventKeyboardEventThe native keyboard event triggered by the key press.