Illustration
ilustrações de estado vazio, sucesso, erro e busca em traço da marca
Ilustrações leves feitas com as cores do tema para estados vazios e telas de resultado.
Flutuando
<.illustration tone="primary" icon="inbox" class="animate-[mo-float_4s_ease-in-out_infinite]" />
nomes
<div class="flex flex-wrap items-start gap-2.5"><div class="flex flex-col gap-1"><.illustration name="empty" /><span class="font-mono text-xs text-muted">empty</span></div><div class="flex flex-col gap-1"><.illustration name="success" /><span class="font-mono text-xs text-muted">success</span></div><div class="flex flex-col gap-1"><.illustration name="error" /><span class="font-mono text-xs text-muted">error</span></div><div class="flex flex-col gap-1"><.illustration name="search" /><span class="font-mono text-xs text-muted">search</span></div><div class="flex flex-col gap-1"><.illustration name="offline" /><span class="font-mono text-xs text-muted">offline</span></div></div>
Uso
<.illustration name="empty-inbox" /> <.illustration name="success" />
Regras
- Sempre acompanhada de título e frase; nunca sozinha.
- Usa só tokens, então muda com o tema.
Referência da API
Todos os function components, atributos, valores e slots que este componente cobre.
Light illustrations for empty states and result screens, drawn with the theme tokens (or inline SVG), so the package needs no static images. The sketch and the girl with the box are styled only with Tailwind utilities.
<.illustration name="empty" />
<.illustration name="success" />
<.empty_box class="h-28" />
<.summit class="h-48 w-full" />
<.scene name="voyage" />
illustration/1: a small card sketch with a round icon badge, in five states:empty,success,error,searchandoffline.empty-inboxis accepted forempty.toneandiconoverride the preset.empty_box/1: a girl with a box, for an empty area.summit/1: the landscape ofhero_cardandauth_art(svg[data-part=summit]), cropped to fill its box.scene/1: portrait scenes (voyage,lighthouse,balloons,aurora) for the picture half ofauth_split.
An illustration always comes with a title and a sentence; never alone.
<.illustration>
| Attr | Type | Default | Values / notes |
|---|---|---|---|
name |
:string |
"empty" |
empty, empty-inbox, error, offline, search, success |
tone |
:string |
nil |
nil, primary, neutral, success, error, info, warning - Overrides the preset's colour. |
color |
:string |
nil |
nil, primary, neutral, success, error, info, warning - The same as tone; tone wins when both are given. |
icon |
:string |
nil |
Overrides the preset's icon. |
class |
:any |
nil |
Any other HTML/phx attribute goes to the root element.
<.empty_box>
| Attr | Type | Default | Values / notes |
|---|---|---|---|
class |
:any |
"h-36" |
Sets the size; the width follows the height. |
Any other HTML/phx attribute goes to the root element.
<.summit>
The summit landscape of the design: sky, sun, stars, three ridges and a dotted trail, painted with
the --lu-hero-* tokens (light, dark and crepusculo, defined by the theme: no host class needed).
It fills its box, cropping the sides (give it a size: class="size-full"). The groups keep the
short names sun, sun-c, st, m1..m3 and ln as hooks for animations. Decorative: aria-hidden. This is the only drawing of it: hero_summit/1 and auth_art/1 render it.
| Attr | Type | Default | Values / notes |
|---|---|---|---|
id |
:string |
"hs" |
Prefix of the SVG's gradient ids (hs-sky...); give each summit on a page its own. |
tone |
:string |
"teal" |
Kept for compatibility; the palette follows the theme (--lu-hero-*). |
class |
:any |
nil |
Any other HTML/phx attribute goes to the root element.
<.scene>
| Attr | Type | Default | Values / notes |
|---|---|---|---|
name (required) |
:string |
voyage, lighthouse, balloons, aurora |
|
position |
:string |
"xMidYMid" |
Where the crop holds (preserveAspectRatio): xMidYMax keeps the bottom, xMinYMid the left. |
label |
:string |
"" |
Read by screen readers; leave empty for decoration. |
class |
:any |
"h-full w-full" |
Any other HTML/phx attribute goes to the root element.