Krizaka UI
Krizaka UI

Empty state

What a list, a search or a panel says when it has nothing to show: an icon, a title, a line and an action.

Web · ✓Mobile · ✓Bureau · ✓StableRetours
Niveau de support
Stable
Taille
0.6 kB gzip, budget 1.0 kB
Qui l'utilise
33 fichiers des produits et sites en production l'importent (Verikora : 10, Folioviv : 6, Sovkora : 2) Compté dans l'inventaire daté du 2026-11-23.
import { EmptyState } from "@krizaka/ui/empty-state";

Web et mobile — le même composant pour React et React Native. Stable : son API ne change qu’à une version majeure.

Pourquoi il est là. Used by Sovkora, Verikora, Folioviv.

Quand l’utiliser

  • When a list is empty for the first time: say what will appear here and how to start.
  • When a search or a filter returns nothing: say so, and how to widen it.

Quand ne pas l’utiliser

  • While the content is loading.À la place : Skeleton
  • When loading failed: say what went wrong.À la place : Alert

Installation

Installer

npm install @krizaka/ui @krizaka/tailwind @krizaka/tokens tailwindcss

Styles

@import "tailwindcss";
@import "@krizaka/tailwind";
@import "@krizaka/ui/tailwind.css";

Importer

import { EmptyState } from "@krizaka/ui/empty-state";

Exemples

Default

An icon, a title and a line.

With an action

What to do next.

Title only

A search without result.

No results

An empty page

A page with nothing in it yet: the bird, what will fill it, the first action.

Props

PropTypeDéfautDescription
titlerequisReactNode—What is empty, in a few words ("No videos yet").
actionReactNode—What to do next: a Button, a link.
descriptionReactNode—Why, or what will fill it.
iconReactNode—A decorative icon (hidden from assistive technology).

Accessibilité

  • role="status": announced politely when it appears after a search.
  • The icon is decorative and hidden from assistive technology.

Bonnes pratiques

  • Title: what is empty, in a few words (“No videos yet”); description: why, or what will fill it.
  • One action at most, the one that fills the list.

Générée depuis le code de @krizaka/ui 5.3.4 : son meta.ts, ses exemples et ses types.Modifier cette documentation sur GitHub

Sur cette page