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

Close Button

Used to trigger closing of dialogs, panels, and other components.

SourceStorybookRecipe

Anatomy

import { CloseButton } from '@saas-ui/react/close-button'
<CloseButton />

Examples

Sizes

Use the size prop to change the size of the close button.

Variants

Use the variant prop to change the appearance of the close button.

Custom Icon

Use the children prop to change the icon of the close button.

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

Clipboard

Next

Collapsible