Button

The button component provides a variety of styles, sizes, and states, supporting icon and text combinations, as well as loading states.

Usage Examples

Button Variants

Set the variant property to switch between different button styles: primary (default), outline, ghost, and link.

300px

Button Sizes

Use the size property to change button sizes: xs, sm, md (default), lg, and xl.

300px

Button States

Buttons support disabled state and loading state, which automatically displays a loading indicator and disables clicking.

300px

Buttons with Icons

Buttons support adding prefix and suffix icons with the prefix-icon and suffix-icon properties, accepting any iconify icon format like i-heroicons-plus.

300px

Full Width Button

Add the full-width property to create buttons that occupy the full width of their parent container, commonly used on mobile devices or form submission scenarios.

300px

Button Colors

Set different button colors with the color property: primary (default), secondary, success, warning, error, and info.

Primary Style with Different Colors

300px

Outline Style with Different Colors

Outline button style combined with different colors. Set variant="outline" along with the color property.

300px

Ghost Style with Different Colors

Ghost button style combined with different colors. Set variant="ghost" along with the color property.

300px

Properties

PropertyBasic component module for translation keys shared across all component documentation pagesTypeDefault
variantThe appearance variant of the button. Options: 'primary', 'outline', 'ghost', 'link'stringprimary
sizeThe size of the button. Options: 'xs', 'sm', 'md', 'lg', 'xl'stringmd
colorThe color theme of the button. Options: 'primary', 'secondary', 'success', 'warning', 'error', 'info'stringprimary
disabledWhether the button is disabledbooleanfalse
loadingWhether to display loading statebooleanfalse
full-widthWhether the button should take up the full width of its containerbooleanfalse
prefix-iconIcon to display before the button textstring
suffix-iconIcon to display after the button textstring
Design Empowers, Innovation Unlimited