glaze/basecoat/empty
Basecoat documentation: https://basecoatui.com/components/empty/
Empty state helpers for “nothing here yet” screens.
Use empty states in lists, tables, or dashboards when there is no data to show, and pair them with an action that helps the user recover.
Anatomy
Compose an empty state from:
icon(optional)titledescriptionactions
Recipe
import glaze/basecoat/empty
import glaze/basecoat/icon
import glaze/basecoat/button
import lustre/element/html
fn no_projects() {
empty.empty([], [
empty.icon([], [icon.folder([])]),
empty.title([], [html.text("No Projects Yet")]),
empty.description([], [html.text("Create your first project to get started.")]),
empty.actions([], [
button.button([], [html.text("Create Project")]),
]),
])
}
Values
pub fn actions(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn description(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn empty(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn header(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn icon(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn outlined(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn title(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)