Empty state

Fills a view that has nothing to show yet — no records, no search results, a fresh workspace — with an explanation and the next step to take.

  • vig-empty-state
  • [vigEmptyStateMedia]
  • [vigEmptyStateActions]
Import
import { EmptyState, EmptyStateMedia, EmptyStateActions } from '@vigdx/ui/empty-state';

Basic

heading names the section (it replaces the deprecated title , which also set the native tooltip); description explains why the view is empty and icon names a registered icon shown above.

No messages

Messages from your team and customers will appear here.

Actions

Mark an element vigEmptyStateActions to add a centered action row. class="contents" lets its buttons join the row's own wrapping flex layout.

No invoices yet

Create your first invoice or import existing ones from a CSV file.

Sizes

size scales spacing, icon and type: sm for tables, popovers and panels, md (default) for cards and sections, lg for a whole page.

Small

For table bodies, popovers and side panels.

Medium

The default, for cards and page sections.

Large

For a whole empty page.

Custom media

A vigEmptyStateMedia element, such as an illustration, replaces the icon. It is tinted with the muted text color, so currentColor strokes follow the theme.

Your board is empty

Boards collect the tasks of one project. Add a column to get started.

No results

For filters and searches, say that nothing matched and offer a way back. headingLevel fits the heading into the surrounding outline, here under the card's heading.

Teams

0 teams found

No matching teams

Check the spelling or clear the filter.

Styling hooks

Internal elements carry a stable data-part and the component's data-scope; both are public API, so removing one is a breaking change. Select a part by both, e.g. [data-scope="empty-state"][data-part="root"] { … }: the pair stays within this component when kit components nest, and also reaches parts in overlay panels, which render outside the host. State is exposed through aria-* and, where listed, a data-state; literal values are checked by the API gate, values computed from the component's state follow its documented types. Other data-* attributes listed below (such as data-opening while an overlay animates) are API too. See Customizing.

Scope: [data-scope="empty-state"]

EmptyState styling hooks
Part Element data-state
root The <section> . —
media Wrapper of the [vigEmptyStateMedia] slot. —
icon The icon circle. —
heading The h2 – h6 heading. —
description The description paragraph. —
actions Wrapper of the [vigEmptyStateActions] slot. —

Accessibility

  • Renders a <section> labelled by its heading, a real h2–h6 heading at headingLevel (3 by default). Choose the level that fits the page outline.
  • The icon is decorative. Hide custom media from assistive technology with aria-hidden="true", or give a meaningful image an alt.
  • Actions are the consumer's own buttons and links; label them with what they do, e.g. “New invoice” rather than “Get started”.
  • When an empty state replaces results after user input, as with a filter, announce the change, e.g. with a result count in a role="status" element.

API

EmptyState

vig-empty-state component

Placeholder for views with nothing to show yet: a large icon (or a projected [vigEmptyStateMedia] illustration), a heading, an optional description and a [vigEmptyStateActions] row. Rendered as a <section> named by its heading.

Example :
<vig-empty-state icon="inbox" heading="No payments yet" description="…">
  <div vigEmptyStateActions><vig-button label="Add payment" /></div>
</vig-empty-state>
EmptyState props
Name Type Default Description
descriptionstring | undefinedundefined
—
headingstring | undefinedundefined

Heading text; also names the section. Set it (or the deprecated title).

headingLevelEmptyStateHeadingLevel3

Heading level (h2–h6) of the title.

iconstring | undefinedundefined

Registered vig-icon name shown large above the title.

sizeEmptyStateSize'md'
—
titlestring | undefinedundefined

Deprecated: Use `heading`; `title` is also the native tooltip attribute. Still honored when `heading` is unset, and never shown as a tooltip.

—

Templates and directives

Templates and directives
Selector Export Description
[vigEmptyStateMedia]EmptyStateMedia

Marks projected content (illustration, image) as the empty state's media.

[vigEmptyStateActions]EmptyStateActions

Marks projected content as the empty state's action row.

Are you sure?