Skip to content
On this page

Button

Filled

fill is default variant for button.

Use color prop to change the button color.

Outlined

You can use variant="outline" to create outlined button.

Customize border-style of outlined buttons

To create outlined button with different border style just add relevant class.

e.g. To create outline button with dashed border, add border-dashed class.

Light

You can use variant="light" to create button with light background (Background with opacity).

Text

Use variant="text" to create a text button.

Icons

You can use icon prop to render icon in button.

Use append-icon prop to render icon after default slot.

You can also use default slot to render icon.
vue
<template>
  <ABtn>
    <i class="i-bx-star" />
    <span>Primary</span>
  </ABtn>
</template>

Block

Add w-full class to make block button.

Icon Only

Use icon-only prop to render icon with icon only button.

Sizing

You can use font-size utility to adjust the size of button.

TIP

If you have container with bigger font size and need default sized button use text-base class.

Roundness

You can adjust button roundness using border-radius utilities.

Loading

You can use the loading prop to inform about a background process or asynchronous operation. This property will display a ALoading component (by default) instead of the icon and/or label of the button.

API

Button

color : ColorProp
variant : LayerVariant
states : boolean
disabled : boolean

Set component in disabled state

loading : boolean

Set button loading state. Although, loading prop accepts boolean value, we set default value to undefined to indicate button won't ever use loading (show/hide) and won't render ASpinner component. However, if loading prop is set to any boolean value (false/true) it will always render ASpinner component.

iconOnly : boolean

Mark button as icon only button to apply square styling

icon : ConfigurableValue

Render icon before button text

appendIcon : ConfigurableValue

Append icon after button text

default : any

Default slot for rendering button content

Released under the MIT License.