Skip to content
On this page

Button

Commonly used button.

Basic usage

Use o and light to define Button's style.

Disabled Button

The disabled attribute determines if the button is disabled.

Use disabled attribute to determine whether a button is disabled. It accepts a Boolean value.

Rounded Button

Use rounded-full or rounded="full" attribute to define a rounded Button

Use to attribute to specify the jump link.

Text Button

Use text to define Button's text style. Buttons without border and background.

Icon Button

Use icons to add more meaning to Button. You can use icon alone to save some space, or use it with text.

Use the icon slots to add icon.

Button Group

TODO

Loading Button

Click the button to load data, then the button displays a loading state.

Set loading attribute to true to display loading state.

Sizes

Besides default size, Button component provides three additional sizes for you to choose among different scenarios.

Use attribute size to set additional sizes with xs, sm,md,lg.

Button Props

NameTypeDefaultDescription
size'xs' | 'sm' | 'md' | 'lg''md'Button size.
lightbooleanfalseDetermine whether it's a light button.
textbooleanfalseDetermine whether it's a text button.
tostringundefinedDetermine whether it's a link button.
roundedbooleanfalseDetermine whether it's a round button.
loadingbooleanfalseDetermine whether it's loading.
disabledbooleanfalseDisable the button.
o'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info''primary'Button type.

Button Slots

NameParametersDescription
default()Customize default content.
icon()Customize icon component.

MIT Licensed