Components

Button

A basic component that is used to trigger an action or event.

Logo

Examples

Below are examples of how to use the Button component.

Variants

Use the variant prop to change the visual style of the button.

Sizes

Use the size prop to change the Button size.

Colors

Use the colorScheme prop to change the Button background.

Radius

Use the radius prop to change the Button shape.

Flavours

Use the flavour prop to change the Button design style.

Loading

Pass the isLoading prop to display a loading indicator to the button.

You can also customize the loading spinner by passing a custom component to the spinner prop.

Icon

Add icon to the Button by using the leftIcon or rightIcon props

API Reference

See the comprehensive guide below for a complete reference to all of the props available to the components.

variant

Type:

"solid" | "light" | "flat" | "outline" | "ghost" | "unstyled"

Specifies the visual variant of the button.

Default:

solid
colorScheme

Type:

"primary" | "success" | "danger" | "warning"

Defines the color scheme for the button.

Default:

primary
radius

Type:

"none" | "sm" | "md" | "lg" | "xl" | "full"

Sets the border radius of the button.

Default:

sm
size

Type:

"xs" | "sm" | "md" | "lg" | "xl"

Controls the button size.

Default:

md
isLoading

Type:

boolean

Indicates if the button is in a loading state.

Default:

false
rightIcon

Type:

React.ElementType

An icon element displayed on the right-side of the Button

Default:

null
leftIcon

Type:

React.ElementType

An icon element displayed on the left-side of the Button

Default:

null
leftIconSize

Type:

number

Sets the size of the left-side icon.

Default:

16
rightIconSize

Type:

number

Sets the size of the right-side icon.

Default:

16
spinner

Type:

ReactNode

Custom spinner to display when the button is in a loading state.

Default:

null
flavour

Type:

"frost" | "corporate" | "neumorphic"

Specifies the design flavour applied to the button.

Default:

corporate
disabled

Type:

boolean

Disables the button, preventing user interaction.

Default:

false
fullWidth

Type:

boolean

Sets the button to take the full width of its container.

Default:

false
hideChildOnLoad

Type:

boolean

Hides the button's children while it's in a loading state.

Default:

false
mode

Type:

"light" | "dark"

The visual mode of the button.

Default:

system