Empty
The page where there is nothing yet.
Default
An icon, what is missing, and the one action that fixes it.
No components yet
Add your first component and it will show up here.
A title, a sentence and a way forward. The first time someone opens a list it is empty, and that screen is the one they judge the product on — so it says what belongs here and hands them the button that puts it there.
Installation
npx philcn@latest add emptyThe file is written into your project. It is yours from then on — change it as you like.
Props
| Prop | Type | What it does |
|---|---|---|
| EmptyMedia.variant | "default" | "icon" | null | `icon` draws the tinted square around a glyph; the default leaves whatever you put in it alone, for a picture or an illustration. |
Types are read from the library itself, so this table cannot describe an option the code no longer has. Everything else you pass goes straight to the underlying <div>.
Worth knowing
- Write the description as an instruction, not an apology. "Add your first component" beats "No data available".