Worklist — Grouped
Anatomy
Time or state headings over compact operational rows. At 40rem or narrower each row becomes a card using the same DOM, order, identity and actions.
maud_ui::blocks::worklist::grouped
Props
Generated from public Rust fields. Defaults are evaluated from the implementation.
| Prop | Type | Default | Description |
|---|---|---|---|
state | crate::blocks::state::State | Ready | Explicit presentation state; Ready preserves the ordinary content. |
aria_label | String | "Grouped worklist" | No description |
group_heading | Heading | H3 | No description |
groups | Vec<Group> | [] | No description |
empty_message | String | "No items to show." | No description |
footer | Option<String> | None | Optional partial-page/freshness explanation, supplied by the caller. |
Examples
light · fictional example
Before 14:00 · 2 arriving
- Maya Chen
CL-260908-014 · Juniper 04 · 2 adults
- Arrival
- 11:30
- Payment
- CAD $560 due
Room readyEarly arrival agreed. Dinner for two requested at 19:00.
- Oliver Reed
CL-260908-018 · Birch 08 · 2 adults
- Arrival
- 12:15
- Payment
- Paid in full
CleaningRoom expected ready at 11:45. Offer tea in the lounge if needed.
Time to confirm · 1 arriving
- Amina Patel
CL-260908-021 · Cedar 12 · 2 adults
- Arrival
- Not confirmed
- Payment
- Unavailable
Confirm arrival
dark · fictional example
Before 14:00 · 2 arriving
- Maya Chen
CL-260908-014 · Juniper 04 · 2 adults
- Arrival
- 11:30
- Payment
- CAD $560 due
Room readyEarly arrival agreed. Dinner for two requested at 19:00.
- Oliver Reed
CL-260908-018 · Birch 08 · 2 adults
- Arrival
- 12:15
- Payment
- Paid in full
CleaningRoom expected ready at 11:45. Offer tea in the lounge if needed.
Time to confirm · 1 arriving
- Amina Patel
CL-260908-021 · Cedar 12 · 2 adults
- Arrival
- Not confirmed
- Payment
- Unavailable
Confirm arrival
Loading, empty, error and disabled
Each example uses the block’s state prop. Empty and error are separate outcomes.
Usage and composition
Import and example
use maud_ui::{blocks::{action::Action, worklist::grouped::{self, Group, Props, Row}}, primitives::{badge, facts_list::Fact}};
grouped::render(Props {
aria_label: "Today's arrivals".into(),
groups: vec![Group {
label: "11:30 · 1 arriving".into(),
rows: vec![Row {
identity: "Maya Chen".into(), subline: "CL-260908-014 · Juniper 04".into(),
facts: [Fact::new("Guests", "2 adults"), Fact::new("Payment", "CAD $560 due")],
status: badge::Props { label: "Room ready".into(), variant: badge::Variant::Success, ..Default::default() },
action: Some(Action::link("Review check-in", "/bookings/14/check-in")),
..Default::default()
}],
..Default::default()
}],
..Default::default()
});
Group fields: label: String defaults empty, subline: Option<String> defaults None, rows: Vec<Row> defaults empty. Supply the correctly scoped count as part of the label. The block does not count a page of rows and call it a total.
Row fields:
Related
Worklist header, attention banner, record header.
Presentation states (0.10.1)
Props::state: maud_ui::blocks::state::State defaults to Ready. Loading { message } shows skeletons; Empty { message, action } and Error { message, retry } provide distinct recovery paths; Disabled { reason } retains admitted content in an inert subtree with an external reason. Loading, empty and error omit ready content. Inert disables interaction, not server authorization or submission of values by an enclosing form. Each live API page shows all four states together. Add state: Default::default() to exhaustive Props literals.
State::Absent (0.11.0) means no input/rule was declared and emits nothing. Keep any caller-owned section heading inside the same conditional. Use Error only for a declared operation that failed; never show an unconfigured-rule message to the user.
Accessibility
Semantic sections and lists preserve identity → facts → status → action → note order on desktop and phone. Status meaning is textual. Native links and forms work without JavaScript; no duplicate mobile controls or click-anywhere rows. Strings are escaped, markup slots are trusted caller fragments. Use only admitted data; the component never derives ETA, readiness, balances or business state. Colors follow the active light/dark theme.