Skip to content

Empty ​

A placeholder for empty data, supporting titles, rich descriptions, icon media, two built-in illustrations, size tiers, horizontal alignment and container variants.

Basic usage ​

Basic usage

Title + description ​

Combine the title attribute (rendered into the visible title region; absorbed from the host on read so no native hover tooltip remains; pass an empty string to clear) with the description attribute.

Title + description

The title layer supports rich content: content in the title slot overrides the attribute text (badges, links or any markup).

Rich title (slot=title)

No members yet Team

Description ​

Description text is set via the description attribute, or via rich content placed in the default slot (which overrides the attribute when present) — handy for wrapped text or usage hints.

Description attribute

Rich description (default slot)

The sync was interrupted by the network. Check the help center or retry later.

Size tiers ​

size provides small / medium / large (default medium), scaling both the media and typography. image-size stays available for pixel-level tuning and takes precedence over the tier.

Size tiers

Custom illustration (image URL / SVG markup / slot) ​

The illustration attribute accepts an image URL or inline SVG/HTML markup; the illustration slot takes any content and has the highest priority.

Image URL

SVG markup

Slot custom illustration

Second built-in illustration ​

illustration="simple" switches to the built-in simple illustration (original lightweight artwork).

Simple illustration

Icon media ​

The icon attribute accepts an icon name (from the @oas-ui/icons registry) and renders an icon badge with a circular tinted background — mutually exclusive with the illustration form. Its color is driven by the CSS variable --oas-empty-icon-color (defaults to the secondary text color; hosts may override it).

Icon media

Icon media (custom color)

Horizontal alignment ​

align="start" or align="end" switches to a horizontal layout (media on the inline-start / inline-end side) — a good fit for wide containers or in-form empty states; the default center stays vertical. Mirrors automatically under RTL.

Horizontal alignment

Container variants ​

variant provides outlined (bordered container) and filled (tinted container); without it the empty state keeps its default bare layout.

Container variants

Hide illustration ​

hide-image hides the media area and keeps only the text and actions.

Hide illustration

Action area ​

Place action buttons in the action slot below the content.

Action area

Invite memberRefresh list

Content composition (avatar / avatar group / search input) ​

The empty state has no built-in variant props for business content — compose it via slots: put oas-avatar / oas-avatar-group in the illustration slot (media area, replacing the built-in illustration), and interactive elements such as oas-input in the default slot (rich description, overriding the description attribute when non-empty) or the action slot.

Avatar (slot=illustration)

AComplete profile

Avatar group (slot=illustration)

ABCDEFInvite members

No search results (default slot + oas-input)

API ​

oas-empty ​

Attributes ​

AttributeDescriptionTypeDefault
alignLayout alignment: center (default, vertical) / start / end (horizontal, media leading or trailing)stringcenter
descriptionDescription text——
hide-imageHide the illustration——
iconIcon-set name (oas-icon icon name): icon media with a tinted circular backdrop, mutually exclusive with illustration——
illustrationCustom illustration: SVG/HTML markup or image URL——
image-sizeIllustration size (px)——
sizeSize preset small / medium (default) / large: scales media and font sizes; orthogonal to image-sizestringmedium
titleTitle shown above the description (absorbed from the host once rendered — native title absorption; use the title slot for rich content)string—
variantContainer variant: outlined (border) / filled (tinted background); none by defaultstring—

Slots ​

NameDescription
defaultRich description slot; overrides the description attribute and built-in text when present
actionAction area, placed below the description
illustrationCustom illustration content, takes precedence over the illustration attribute
titleRich title slot; overrides the title attribute when present

CSS Variables ​

CSS VariableDefault
--oas-empty-desc-sizevar(--oas-font-size-md)
--oas-empty-icon-colorvar(--oas-color-text-secondary)
--oas-empty-title-sizevar(--oas-font-size-lg)

Released under the MIT OR Apache-2.0 License.