Empty state: what the area is, why it is empty and the one next step.
<.empty_state icon="inbox" title="No orders yet">
Orders from the counter and the site show up here.
<:action><button class="lu-b c-mono v-solid s-sm sh-rounded">New order</button></:action>
</.empty_state>
<.empty_state variant="inline" icon="inbox" title="No comments yet.">
<a href="#">Write the first</a>
</.empty_state>Variants:
canvas(default) - the canvaslu-empty: icon tile, title, reason, actions;card- centered block for a whole area, icon with pulsing rings (tonedefault,gradientorpositive) and an optionalkicker;inline- compact dashed notice for lists and results (colorneutral/success/error);table- centered notice for the body of an empty table (a disc tinted bycolor);plain- the faint one-line notice inside a card.
level (2, 3 or 4) marks the title of a card as a heading (aria-level); without it the
title is a plain bold line.
Summary
Functions
Same as empty_state/1 (same attributes and slots), under the name the design vitrine uses.
The one-line empty state inside a panel or a table cell: an icon and a sentence.
Functions
Attributes
variant(:string) - Defaults to"canvas". Must be one of"canvas","card","inline","table", or"plain".title(:string) (required)kicker(:string) - Defaults tonil.icon(:string) - Defaults tonil.tone(:string) - Defaults to"default". Must be one of"default","gradient", or"positive".color(:string) - Defaults to"neutral". Must be one of"neutral","success", or"error".level(:integer) - Defaults tonil.Must be one ofnil,2,3, or4.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
action- The next step.illustration- Replaces the icon.inner_block- The reason it is empty.
Same as empty_state/1 (same attributes and slots), under the name the design vitrine uses.
Attributes
variant(:string) - Defaults to"canvas". Must be one of"canvas","card","inline","table", or"plain".title(:string) (required)kicker(:string) - Defaults tonil.icon(:string) - Defaults tonil.tone(:string) - Defaults to"default". Must be one of"default","gradient", or"positive".color(:string) - Defaults to"neutral". Must be one of"neutral","success", or"error".level(:integer) - Defaults tonil.Must be one ofnil,2,3, or4.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
action- The next step.illustration- Replaces the icon.inner_block- The reason it is empty.
The one-line empty state inside a panel or a table cell: an icon and a sentence.
<.inline_empty icon="inbox" text="No comments yet" />Attributes
text(:string) (required)icon(:string) - Defaults tonil.color(:string) - Defaults to"neutral". Must be one of"neutral","success", or"error".class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
action- The next step.