zedkit
@zedtech/zedkit-ui

Fill a list's loading, empty, error and success states

One host per state: Spinner, EmptyState, ErrorState, then the filled list.

alpha

At a glance

Preview

@zedtech/zedkit-ui — Spinner, EmptyState, ErrorState, DataTable, Button, Text, createDataTableColumns

Preview

Loading invoices

View props table

Install

pnpm add @zedtech/zedkit-ui

Latest: 0.6.4 (via changesets).

Example

Usage
import { Spinner, Text } from "@zedtech/zedkit-ui";
<Spinner label="Loading invoices" />
<Text>Loading invoices</Text>

Live preview: Empty

Preview

No invoices

Create an invoice to send to a client.

Empty
import { Button, EmptyState } from "@zedtech/zedkit-ui";
<EmptyState
  title="No invoices"
  description="Create an invoice to send to a client."
  actions={<Button>New invoice</Button>}
/>

Live preview: Error

Preview

Error
import { Button, ErrorState } from "@zedtech/zedkit-ui";
<ErrorState
  title="Could not load invoices"
  description="Check your connection and try again."
  actions={<Button variant="outline">Try again</Button>}
/>

Live preview: Success

Preview

Ada36
Bob30
Success
import { DataTable, createDataTableColumns } from "@zedtech/zedkit-ui";
const helper = createDataTableColumns<{ name: string; age: number }>();
const columns = [helper.accessor("name", { header: "Name" })];
<DataTable columns={columns} data={[{ name: "Ada", age: 36 }]} />

Wraps: (none)

Props

Prop

Type

On this page