Skip to content

EmptyState

An empty state component with icon and action slots.

Importing

ts
import "@tapsioss/web-components/empty-state";
ts
import { EmptyState } from "@tapsioss/react-components/EmptyState";

Component Usage

html
<tapsi-empty-state></tapsi-empty-state>
tsx
<EmptyState />

Properties

NameDescriptionTypeDefault Value
titleThe title of the empty state.string""
descriptionThe description of the empty state.string""
content-alignmentThe alignment of the content."auto" | "center""auto"

Slots

NameDescription
iconThe slot for icon element.
actionThe slot for action element.

TIP

You can use slot names as variables:

ts
import { Slots } from "@tapsioss/web-components/empty-state";

console.log(Slots.ICON); // "icon"
console.log(Slots.ACTION); // "action"
ts
import { EmptyStateSlots } from "@tapsioss/react-components";

console.log(EmptyStateSlots.ICON); // "icon"
console.log(EmptyStateSlots.ACTION); // "action"