Skip to Content
DocsResourcesPricingShowcase

Button

Used to trigger an action or event

SourceStorybookRecipe

import { Button } from '@saas-ui/react/button'
import { ButtonGroup } from '@saas-ui/react/button-group'
<Button>Click me</Button>

Use the size prop to change the size of the button. You can set the value to xs, sm, md, or lg.

Use the variant prop to change the visual style of the Button. You can set the value to solid, subtle, outline, ghost or plain

Use icons within a button

Use the colorPalette prop to change the color of the button

gray

red

green

blue

teal

pink

purple

cyan

orange

yellow

Use the loading and loadingText prop to show a loading spinner

Use the ButtonGroup component to group buttons together

PropDefaultType
colorPalette 'gray'
'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'cyan' | 'purple' | 'pink' | 'accent'

The color palette of the component

size 'md'
'xs' | 'sm' | 'md' | 'lg'

The size of the component

variant 'solid'
'solid' | 'subtle' | 'surface' | 'outline' | 'ghost' | 'plain'

The variant of the component

loading
boolean

loadingText
React.ReactNode

Previous

Breadcrumb

Next

Card