Your cart is empty
Explore our products and add items to your cart
'use client'
import { EmptyState } from '@saas-ui/react'
import { LuShoppingCart } from 'react-icons/lu'
export const EmptyStateBasic = () => {
return (
<EmptyState
icon={<LuShoppingCart />}
title="Your cart is empty"
description="Explore our products and add items to your cart"
/>
)
}
Anatomy
import { EmptyState } from '@saas-ui/react/empty-state'
<EmptyState title="No data" description="No data found" />
Examples
Action
Here's an example of an empty state with an action button.
Start adding tokens
Add a new design token to get started
'use client'
import { Button, ButtonGroup, EmptyState } from '@saas-ui/react'
import { HiColorSwatch } from 'react-icons/hi'
export const EmptyStateWithAction = () => {
return (
<EmptyState
icon={<HiColorSwatch />}
title="Start adding tokens"
description="Add a new design token to get started"
>
<ButtonGroup>
<Button variant="outline">Create token</Button>
<Button variant="solid">Import</Button>
</ButtonGroup>
</EmptyState>
)
}
List
Here's an example of an empty state with a list.
No results found
Try adjusting your search
- Try removing filters
- Try different keywords
'use client'
import { List } from '@chakra-ui/react'
import { EmptyState } from '@saas-ui/react'
import { LuSearch } from 'react-icons/lu'
export const EmptyStateWithList = () => {
return (
<EmptyState
icon={<LuSearch />}
title="No results found"
description="Try adjusting your search"
>
<List.Root variant="marker">
<List.Item>Try removing filters</List.Item>
<List.Item>Try different keywords</List.Item>
</List.Root>
</EmptyState>
)
}
Props
Root
Prop | Default | Type |
---|---|---|
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' | 'sm' | 'md' | 'lg' The size of the component |
align | 'center' | 'start' | 'center' The align of the component |
as | React.ElementType The underlying element to render. | |
asChild | boolean Use the provided child element as the default rendered element, combining their props and behavior. For more details, read our Composition guide. | |
unstyled | boolean Whether to remove the component's style. |