Empty State

What a section, tab or page shows when it has nothing in it yet: one line of sentence-case copy that says what will appear, and at most one action.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { EmptyState } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

No tasks yet

Tasks you add to this opportunity show here.

Props

layout
frame
title
description
icon
action

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoMatch the layout to the space: line under a section header that already carries Add, inline for an empty tab, and stacked for a whole page with room.
DoUse framed, with 8 px corners, when it stands alone, and contained, with 4 px corners, among filled tables.
DoWrite title as what's missing, like "No tasks yet", and description as one sentence on what will appear, like "Tasks you add to this opportunity show here."
DoGive it at most one action, usually an outline sm Button like "Add task".
Don'tUse it for one empty value, like a contact with no phone number. Use EmptyValue in the cell or detail row.
Don'tWrite "Nothing here" or "No data". Name what's missing, so a lawyer knows whether to add something or look elsewhere.

Props

PropTypeDefaultDescription
layout"stacked" | "inline" | "line""stacked"Stacked: tile above a centred column, for whole pages with room. Inline: tile, text and action in a row, for an empty tab. Line: one muted line under a section header that already carries Add.
frame"bare" | "framed" | "contained""bare"Bare sits on the page. Framed (8 px) stands alone. Contained (4 px) sits among filled tables.
iconReactNode—The 16 px icon in the 32 px tile. Not shown in a line.
title *ReactNode—Says what's missing, like "No tasks yet".
descriptionReactNode—One sentence on what will appear here.
actionReactNode—One action, usually an outline sm Button like "Add task".
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { EmptyState, PlusIcon } from "@leap-crm/design-system";

<EmptyState
  title="No tasks yet"
  description="Tasks you add to this opportunity show here."
  icon={<PlusIcon />}
/>