Empty

@sushindustries/ui

Nothing, said properly: what is missing, why that is fine, and what to do next - in that order, quietly.

4 min read
View as MarkdownEdit on GitHub

Empty is what a screen shows when there is nothing to show: an icon, a title stating what is missing, one line on why that is fine, and an action for what to do next, in that order. Reach for it wherever a list, search or page can legitimately come back with zero results.

Viewport width
Phone22remthe floor, the narrowest this promises to work at
tanstacktanstack add https://adamjurek.com/r/tanstack/empty.jsonshadcnpnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/empty.json

Why it is built this way

An empty state is the one screen where the interface has the reader's full attention, so the order is deliberate: the title says what is missing without apologising for it, the line underneath explains why, and the action is the one way out rather than a menu of choices. The icon always renders, defaulting to a generic glyph, because a bare title with nothing above it reads as a failed render rather than an intentional empty state.

Install

tanstack add https://adamjurek.com/r/tanstack/empty.json
shell
pnpm dlx shadcn@latest add https://adamjurek.com/r/shadcn/empty.json
shell
pnpm add @sushindustries/ui @sushindustries/atoms
shell

What you get

Version0.1.0
Categorycontent · Loading
Filesempty.tsx
DependenciesNone
Also installsiconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content
Tagsempty-state, no-deps

No runtime dependencies

It brings nothing with it beyond the stylesheet.

UsesIconIconThe glyph set, generated from a Markdown table where every drawing carries its reason. One component, typed names, no icon font.@sushindustries/ui · content
Mentioned inData Table