Skip to Content
Documentation
Saas UI
Get Pro
Getting started
Components
Overview

Button

Used to trigger an action or event

SourceStorybookRecipe

Anatomy

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

Examples

Sizes

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

Variants

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

Icon

Use icons within a button

Color

Use the colorPalette prop to change the color of the button

gray

red

green

blue

teal

pink

purple

cyan

orange

yellow

Loading

Use the loading and loadingText prop to show a loading spinner

ButtonGroup

Use the ButtonGroup component to group buttons together

Props

PropDefaultType
colorPalette 'gray'
'gray' | 'zinc' | 'neutral' | 'stone' | 'red' | 'orange' | 'amber' | 'yellow' | 'lime' | 'green' | 'emerald' | 'teal' | 'cyan' | 'sky' | 'blue' | 'indigo' | 'violet' | 'purple' | 'fuchsia' | 'pink' | 'rose' | 'presence' | 'status' | 'sidebar' | 'sidebar.accent' | 'accent' | 'slate'

The color palette of the component

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

The size of the component

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

The variant of the component

loading
boolean

loadingText
React.ReactNode

Previous

Breadcrumb

Next

Card