Skip to content
Stylhero 0.8.0
Components

Core

Layout and type

Inputs

Overlays

Navigation

Data display

Charts

Transitions and utilities

Page pieces (landing pages, portfolios, docs)

Icons

Components / Core

EmptyState

Placeholder for an empty list or search: an icon, a title, a short explanation and an action.

import { EmptyState } from "@stylhero/ui";

Example

Code
import { Button, EmptyState, SearchIcon } from "@stylhero/ui";

function EmptyStateExample() {
  return (
    <EmptyState icon={<SearchIcon />} title="No builds yet" action={<Button>Start a build</Button>}>
      Builds you save show up here.
    </EmptyState>
  );
}

Props

PropTypeDefaultDescription
title required ReactNode -
action ReactNode - Usually one primary Button that creates the first item.
children ReactNode -
icon ReactNode - A Lucide icon, e.g. <Users />

Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.

Generated from src/components/EmptyState.tsx. Something wrong or missing? Open an issue.