Empty state
VEmptyState says that there is nothing to show yet, and offers what to do about it.
Usage
vue
No invoices yet
Invoices you create or import appear here.
Examples
Sizes
size scales the badge, the spacing and the title: sm for a panel or a list, lg for a whole page.
vue
Nothing in this folder
The scale follows the space it fills.
No messages
The scale follows the space it fills.
Your workspace is empty
The scale follows the space it fills.
Content and heading level
The default slot replaces description with text that holds links. headingLevel renders the title as a heading without changing how it looks.
vue
You are all caught up
New mentions and replies show up here. Choose what you hear about in your notification settings.
In tables and comboboxes
VDataTable and VCombobox show a small empty state titled with their emptyText. Their empty slot replaces it, for instance with an empty state that has actions.
vue
| Name | Status |
|---|---|
No orders | |
| Name | Status |
|---|---|
No orders yet Orders placed by your customers appear here. | |
API
Props
| Prop | Type | Default |
|---|---|---|
title | string | none |
| What is empty, in a few words. | ||
description | string | none |
| Why, or what to do next. Replaced by the default slot. | ||
icon | IconSource | none |
Icon drawn in a round badge. Replaced by the media slot. | ||
size | EmptyStateSize'sm' | 'md' | 'lg' | 'md' |
| Scale of the block. | ||
headingLevel | EmptyStateHeadingLevel1 | 2 | 3 | 4 | 5 | 6 | none |
Renders the title as h1 to h6. Without it, the title is a paragraph. | ||
Slots
| Slot | Type |
|---|---|
default | {} |
| Description with formatting or links. | |
media | {} |
| Illustration replacing the icon badge. | |
actions | {} |
| Buttons or links that leave the empty state. | |
Types
Types used in the API tables. Import exported types from vectis-ui.
export interface BuiltinIcon {
name: string
paths: readonly [string] | readonly [string, string]
}export type IconRender =
| { path: string; viewBox?: string }
| { component: Component; props?: Record<string, unknown> }
| { src: string }
| { text: string; class?: string }
| { class: string }export type IconSource = string | BuiltinIcon | IconRender
CSS variables
| Token | Value |
|---|---|
--vectis-control-size-empty-state-media-sm | 2.5rem |
--vectis-control-size-empty-state-media-md | 3rem |
--vectis-control-size-empty-state-media-lg | 4rem |
--vectis-control-size-empty-state-text-max | 28rem |