glaze/basecoat/table
Basecoat documentation: https://basecoatui.com/components/table/
Table helpers for data grids and record lists.
Recipe
import glaze/basecoat/table
import lustre/element/html
fn invoices_table() {
table.scrollable([], [
table.table([], [
table.thead([], [
table.tr([], [
table.th([], [html.text("Invoice")]),
table.th([], [html.text("Status")]),
table.th([table.align_right()], [html.text("Amount")]),
]),
]),
table.tbody([], [
table.tr([], [
table.td([], [html.text("INV001")]),
table.td([], [html.text("Paid")]),
table.td([table.align_right(), table.font_medium()], [html.text("$250.00")]),
]),
]),
])
])
}
Values
pub fn align_right() -> attribute.Attribute(msg)
pub fn caption(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn font_medium() -> attribute.Attribute(msg)
pub fn scrollable(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn table(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn tbody(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn td(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn tfoot(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn th(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn thead(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn tr(
attrs: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)