››empty
Empty
Fills the space when there is nothing to show, such as an empty cart or a search without results, with an icon, a title, a hint and actions.
Parts
| Part | File | Does |
|---|---|---|
| Empty | Empty.vue | Groups all parts of the empty state. |
| EmptyContent | EmptyContent.vue | Holds the actions offered to the user when there is nothing to show. |
| EmptyDescription | EmptyDescription.vue | Explains why there is nothing to show and what to do next. |
| EmptyHeader | EmptyHeader.vue | Groups the media, title and description of the empty state. |
| EmptyMedia | EmptyMedia.vue | Shows an icon or image above the title of the empty state. |
| EmptyTitle | EmptyTitle.vue | States that there is nothing to show. |
Anatomy
<Empty>
<EmptyHeader>
<EmptyMedia />
<EmptyTitle />
<EmptyDescription />
</EmptyHeader>
<EmptyContent />
</Empty>Styling
All of Empty’s styles live in empty.json. New to styling in Frontic UI? How styling works →
Install
- npm packages
- class-variance-authority
- reka-ui
API reference
Groups all parts of the empty state. Renders a <div>.
Props 3
| Prop | Type | Default | |
|---|---|---|---|
| asChild | boolean | false | |
| |||
| as | AsTag | Component | 'div' | |
| |||
| class | ClassValue | — | |
| |||
Recipe empty 1 group
rounded rounded.none0px
gap spacing.41rem
padding spacing.61.5rem
display flex
width full
minWidth spacing.00rem
flex 1
flexDirection column
alignItems center
justifyContent center
textAlign center
@md › padding spacing.123rem
Empty