Skip to content
v0.2.10

EmptyState

A quiet explanation and optional next action when content is absent.

Preview

No projects yet

Create a project to get started.

Use EmptyState

EmptyState is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
empty-state.tsxTSX
"use client";

import { FloodRoot, EmptyState, Button } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <EmptyState title="No projects yet" description="Create a project to get started." actions={<Button>Create project</Button>} />
    </FloodRoot>
  );
}

Design notes

  • Composes Stack, Heading, Text, IconSlot and Inline. Optional icon is decorative; title and description explain the missing content.
  • Static by default, without status/alert announcements or automatic focus. Host owns whether a result change should be announced.
  • Choose headingLevel for the page hierarchy. Density controls relative padding. Host actions remain ordinary named controls; no loading, fetching or error recovery engine is supplied.
  • Available in 0.2.4; use matching installed declarations.

API reference

PropValuesDefault
titlestringRequired
descriptionReactNode—
iconReactNode—
actionsReactNode—
headingLevel2 | 3 | 4 | 5 | 62
density"compact" | "comfortable""comfortable"
Native HTML propsOmit<HTMLAttributes<HTMLDivElement>, "title" | "children">Forwarded
View TypeScript source