howdy/ui/table
Tables for rows of data.
table.table([], [
table.caption([], [text("Recent invoices")]),
table.header([], [
table.row([], [table.head([], [text("Invoice")]), table.head([], [text("Amount")])]),
]),
table.body([], list.map(invoices, fn(invoice) {
table.row([], [table.cell([], [text(invoice.id)]), table.cell([], [text(invoice.amount)])])
})),
])
A table wider than its container scrolls sideways instead of overflowing the page.
Values
pub fn body(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
The <tbody>.
pub fn caption(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn caption_class() -> css.Class
pub fn cell(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
pub fn cell_class() -> css.Class
pub fn footer(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
The <tfoot>, for totals.
pub fn footer_class() -> css.Class
pub fn head(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
A header cell.
pub fn head_class() -> css.Class
pub fn header(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
The <thead>.
pub fn row(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
A row. Set aria-selected to highlight it.
pub fn scroll_class() -> css.Class
pub fn table(
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
The table, in a container that scrolls sideways when it is too wide.
Attributes go on the <table>.
pub fn table_class() -> css.Class