Empty State
The Empty State is displayed for main application features that have never been interacted with before. The Empty State is also used for smaller features in the app that primarily focus on data entry and have no data to show.
With Icon
Title for state
Text to appear below. Lorem ipsum dolor sit amet consectituor.
Other stuff such as buttons...
With Icon and Compact
Compact variants, with a smaller icon, are useful for smaller contexts.
Title for state, compact variety
Text to appear below. Lorem ipsum dolor sit amet consectituor.
Other stuff such as buttons...
With Graphic
Title for state, with graphic instead of icon
Text to appear below. Lorem ipsum dolor sit amet consectituor.
Other stuff such as buttons...
Sage Component
SageEmptyState
<h3>With Icon</h3>
<%= sage_component SageEmptyState, {
icon: "trash",
title: "Title for state",
text: "Text to appear below. Lorem ipsum dolor sit amet consectituor."
} do %>
<p>Other stuff such as buttons...</p>
<% end %>
<h3>With Icon and Compact</h3>
<p> Compact variants, with a smaller icon, are useful for smaller contexts.</p>
<%= sage_component SageEmptyState, {
icon: "bold",
title: "Title for state, compact variety",
text: "Text to appear below. Lorem ipsum dolor sit amet consectituor.",
size: "compact",
} do %>
<p>Other stuff such as buttons...</p>
<% end %>
<h3>With Graphic</h3>
<%= sage_component SageEmptyState, {
graphic: image_tag("card-placeholder-lg.png", alt: ""),
title: "Title for state, with graphic instead of icon",
text: "Text to appear below. Lorem ipsum dolor sit amet consectituor.",
} do %>
<p>Other stuff such as buttons...</p>
<% end %>
Property | Description | Type | Default |
---|---|---|---|
|
If true, the empty state will be visually centered inside the entire page context. |
Boolean |
|
|
Adds an icon above the content. |
String |
|
|
Adds a graphic above the content. |
String |
|
|
The size of the icon adjusts depending on this context setting:
|
|
|
|
Text for empty state. |
String |
|
|
Title for empty state. |
String |
|
|
Sets which HTML heading tag to use on the title. |
One of |
|
Content Slots | |||
|
Slot into which buttons or other actions can be placed. |
||
|
Slot into which text can be placed. |
||
|
Slot into which video cards or other media can be placed. |