Skip to content

Empty ​

Empty is a quiet placeholder for lists, tables, search results, and first-run panels. It is not an alert.

Demos ​

Basic

With no description, English pages read “No data” and Chinese pages read 「暫無資料」, based on document.documentElement.lang. The illustration is decorative.

Custom description

Pass description, or replace the text with the description slot.
No matching courses. Try a shorter query.

Title and actions

title is the stronger line. action and extra are the same action row — usually a primary Button at the md 34 height, plus an optional ghost.
New courseLearn more

Large

size="large" increases padding (about 44px) and the illustration (128×96, from 96×72).

Custom illustration

The image slot (alias icon) replaces the built-in line art. :show-icon="false" hides the default art when you do not pass a replacement.

In a table

Drop Empty inside the table body. The component stays a centered column and does not force the action button to full width.
NameStatusUpdated
Clear filters

API ​

Empty Props ​

PropTypeDefault
descriptionstring「暫無資料」 / “No data” by document language
titlestring''
size'default' | 'large''default'
show-iconbooleantrue

Set description yourself when the surrounding page language and documentElement.lang differ. show-icon="false" hides the built-in illustration.

Empty Slots ​

NameDescription
image / iconCustom illustration. Replaces the built-in SVG
titleReplaces the title prop
descriptionReplaces the description text
extra / actionActions, usually gk-button
defaultExtra body under the description

CSS Parts ​

PartDescription
rootCentered column
imageIllustration. aria-hidden="true"
titleHeading
descriptionSupporting text
extraAction row

There is no role="alert". Empty is a placeholder, not an error.

Accessibility ​

  • The illustration is aria-hidden. Do not rely on it alone; keep a description.
  • Title and description are normal text.
  • Action buttons bring their own names and focus rings. Empty does not add an alert role.