Measured entry

shadcn-empty

cardunclassified

A copy-in React primitive for composing empty states from separate container, header, media, title, description, and content pieces. It ships as TSX styled with Tailwind utilities and shadcn theme tokens, using class-variance-authority plus the project’s cn helper backed by clsx and tailwind-merge.

Specimen
Harness screenshot of shadcn-empty at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-empty at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-empty at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-empty
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal29.8 KB (95.3 KB build, 65.5 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 679ms
error during build:
[vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>re-6a8b7dbba9e0/src/cut/components/ui/empty.tsx".

Verdict

A dependable, composable empty-state shell that builds and mounts cleanly without a provider. The primitive is flexible, but its semantics and actions are entirely the consumer’s responsibility, and the supplied fixed-width demo needs a responsive width adjustment.

Use it if

  • You want a flexible empty-state shell that accepts your own icon, message, and actions.
  • Your app already uses Tailwind and shadcn-style theme tokens.
  • You prefer copy-in primitives that can be edited locally over a packaged widget.

Skip it if

  • You need a dependency-free component or do not want Tailwind utility classes in shared UI.
  • You need built-in state logic, loading behavior, or action handling rather than a layout primitive.
  • You require semantic heading and region roles without adding them at the call site.
  • You plan to keep the supplied fixed-width demo unchanged on narrow screens, where it overflows.

Install

Installation record for shadcn-empty
Declared dependenciesclsx, tailwind-merge
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add Tailwind, class-variance-authority, clsx, and tailwind-merge; provide a cn utility; and define the muted, foreground, primary, and primary-foreground theme tokens used by the classes. Replace the source alias with a local import path.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-16

Alternatives

Other published entries for the card pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.