Skip to main content

Usage

The VEmptyState component provides a user-friendly way to communicate when content is unavailable.
<template>
  <v-empty-state
    headline="No items found"
    title="Get started"
    text="Add your first item to get started with this feature"
  />
</template>

With Icon

Display an icon in the empty state:
<template>
  <v-empty-state
    icon="mdi-inbox"
    title="Your inbox is empty"
    text="When you receive messages, they will appear here"
  />
</template>

With Image

Use a custom image:
<template>
  <v-empty-state
    image="/path/to/image.svg"
    title="No results"
    text="Try adjusting your search or filters"
  />
</template>

With Action

Add a call-to-action button:
<template>
  <v-empty-state
    icon="mdi-cloud-upload"
    title="No files uploaded"
    text="Upload your first file to get started"
    action-text="Upload File"
    @click:action="handleUpload"
  />
</template>

<script setup>
const handleUpload = () => {
  console.log('Upload clicked')
}
</script>
Make the action button navigate:
<template>
  <v-empty-state
    title="Page not found"
    text="The page you're looking for doesn't exist"
    action-text="Go Home"
    to="/"
  />
</template>

Justify Content

Control the alignment:
<template>
  <v-empty-state
    justify="start"
    title="Empty"
    text="No content available"
  />
</template>

Custom Size

Adjust the icon/image size:
<template>
  <v-empty-state
    icon="mdi-magnify"
    size="150"
    title="No results"
  />
</template>

Props

headline
string
Large text displayed at the top of the empty state
title
string
Title text for the empty state
text
string
Descriptive text providing context
icon
IconValue
Icon to display in the empty state
image
string
Image source URL to display instead of an icon
color
string
Color applied to the icon and action button
bgColor
string
Background color of the empty state container
actionText
string
Text for the action button
href
string
Creates an anchor link for the action button
to
string
Router link destination for the action button
justify
'start' | 'center' | 'end'
default:"center"
Horizontal alignment of the content
size
string | number
Size of the icon or image. Defaults to 96 for icons, 200 for images
textWidth
string | number
default:"500"
Maximum width of the text content
width
string | number
Width of the entire component
height
string | number
Height of the entire component
theme
string
Specify a theme for this component and all of its children

Slots

default
slot
The default slot for custom content below the text
headline
slot
Slot to customize the headline content
title
slot
Slot to customize the title content
text
slot
Slot to customize the text content
media
slot
Slot to customize the icon/image area
actions
slot
Slot to customize the action button area

Events

click:action
event
Emitted when the action button is clicked
Empty states are crucial for good UX. They guide users on what to do next when there’s no content, reducing confusion and improving engagement.

Build docs developers (and LLMs) love