Skip to content

Empty State with Illustration

Tailwind CSS empty state with an animated inline SVG illustration, clear headline, primary and secondary call-to-action buttons and template shortcuts.

Also known as: empty state, no data placeholder, blank slate, empty list message, zero state

Empty State with Illustration live demo

Open in new tab

Tailwind CSS code (HTML, CSS)

An empty state built with Tailwind CSS that replaces a blank list with a friendly inline SVG illustration, a short explanation and clear next steps. It is shown here inside a "Projects" panel with a primary Create project button, a secondary Import CSV button and three template shortcuts, a pattern that fits dashboards, admin panels, inboxes and any SaaS screen a new user sees before they have added data.

How it works

The root is .tes-root, a section with a stone background that holds a white rounded panel. The panel header shows the title, a 0 count badge and a Filters button, so the empty state reads as part of a real screen. Below it, centered content contains the .tes-illustration wrapper with a single inline SVG: an open emerald box, two floating documents and a few sparkles. The documents are grouped in .tes-float elements and the sparkles in .tes-twinkle; style.css moves them with the tes-float and tes-twinkle keyframes. There is no JavaScript.

Under the headline and description, the buttons stack full width on phones and sit side by side from the sm breakpoint. A dashed divider separates the template links, which use a one-column list on phones and sm:grid-cols-3 on larger screens.

Customization

  • --tes-float-distance and --tes-float-speed on .tes-illustration in style.css: control how far and how fast the documents float.
  • The fill colors inside the SVG (#10b981, #059669, #ecfdf5): change them to match your brand, or replace the whole SVG with your own illustration.
  • bg-emerald-600 hover:bg-emerald-700 on the .tes-cta button: swap emerald for indigo or rose to restyle the primary action.
  • w-56 sm:w-64 on .tes-illustration: make the artwork smaller for compact cards or larger for full-page states.
  • Delete the template block below the dashed border-t if you only need a single call to action.
  • Change the headline, the description and the button labels for other contexts such as "No messages", "No results" or "No invoices yet".

Use cases

  • Project lists: replace a blank panel with an illustration and a Create project button
  • Admin panels: offer a secondary Import CSV action for users with no data yet
  • Dashboards: template shortcuts give new users a quick first step
  • Inboxes: a friendly headline explains why the screen is empty

Accessibility

The illustration is purely decorative and wrapped in aria-hidden="true", so screen readers move straight to the "No projects yet" heading and the explanation. The panel is labelled by its heading via aria-labelledby. All actions are native button and a elements with visible text, keyboard focus and a clear emerald focus-visible outline; icons inside them are hidden from assistive technology. Text colors meet WCAG AA contrast on the white panel, and the floating animation stops under prefers-reduced-motion: reduce.

Usage notes

Connect the buttons to your own handlers, for example opening a create dialog or a file picker. If the empty state appears after a search returns nothing, change the copy to explain why and offer a "Clear filters" action instead of Create.

Empty State with Illustration at a glance

Framework
Tailwind CSS
Code
HTML, CSS
JavaScript
Only Tailwind CSS's own script
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Empty States
License
Free for personal and commercial use

Questions about this template

Can I use the Empty State with Illustration code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Tailwind CSS's own JavaScript is used, and the download already includes it.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Empty State with Illustration – free Tailwind CSS empty state template
Empty State with Illustration · free Tailwind CSS empty state template

More Empty States

No Search Results – free Bootstrap 5 empty state template

No Search Results

Bootstrap 5 empty search state with a spelling-aware "Did you mean" suggestion, removable filter chips, search tips, popular searches and a support link.