howtomakeaname/sumi/layout does not have a README file

    ShortcutItem

    pub(all) struct ShortcutItem {
    label : String
    keys : String
    }

    One shortcut row: an action label and its key combination.

    ShortcutItem::new

    fn ShortcutItem::new(label : String, keys : String) -> ShortcutItem

    ShortcutSection

    pub(all) struct ShortcutSection {
    title : String
    items : Array[ShortcutItem]
    }

    A titled cluster of shortcuts. The title carries a hairline underline; sections are separated by an 8px gap.

    ShortcutSection::new

    fn ShortcutSection::new(title : String, items : Array[ShortcutItem]) -> ShortcutSection

    TabEntry

    pub(all) struct TabEntry {
    value : String
    label : String
    icon :
    Html
    ?
    }

    One tab in a tabs control.

    TabEntry::new

    fn TabEntry::new(value : String, label : String, icon? :
    Html
    ) -> TabEntry

    card

    fn[C :
    IsChildren
    ] card(id? : String, class? : String, title? : String, attrs? :
    Attrs
    , style? : Array[String], children : C) ->
    Html

    A surface container for grouping content on the canvas.

    card_section

    A card with the design's header/content split.

    divider

    fn divider(id? : String, class? : String, attrs? :
    Attrs
    , style? : Array[String]) ->
    Html

    A thin horizontal rule for separating stacked content.
    fn pagination(page~ : Int, total~ : Int, on_change? :
    Emit
    [Int], id? : String, class? : String, attrs? :
    Attrs
    , style? : Array[String]) ->
    Html

    A minimal ‹ page / total › pager for stepping through a small result set. Controlled: the parent owns page and applies on_change. The arrow buttons clamp at the range ends and disable there.

    shortcuts_panel

    fn shortcuts_panel(sections~ : Array[ShortcutSection], title? : String, on_close? :
    Cmd
    , width? : Int, max_height? : Int, id? : String, class? : String, attrs? :
    Attrs
    , style? : Array[String]) ->
    Html

    The keyboard-shortcuts reference panel from the design: an elevated 264px sheet with a titled header and close button, then titled sections of label + key-chip rows. Long lists scroll inside the body with the library's standard scrollbar.

    shortcuts_panel(
    title="Shortcuts",
    sections=[
    ShortcutSection::new(
    "General",
    [
    ShortcutItem::new("Toggle sidebar", "Cmd /"),
    ShortcutItem::new("Send message", "Enter"),
    ],
    ),
    ],
    on_close=close_panel,
    )

    tabs

    fn tabs(items~ : Array[TabEntry], selected~ : String, on_select? :
    Emit
    [String], id? : String, class? : String, attrs? :
    Attrs
    , style? : Array[String]) ->
    Html

    A tab strip. Controlled: the caller owns the selected value; render the matching panel content next to the returned strip.

    tabs(
    items=[TabEntry::new("all", "All"), TabEntry::new("mine", "Mine")],
    selected=tab,
    on_select=set_tab.map(v => _ => v),
    )

    toolbar

    fn[C :
    IsChildren
    ] toolbar(id? : String, class? : String, title? : String, attrs? :
    Attrs
    , style? : Array[String], children : C) ->
    Html

    A floating horizontal bar that groups controls — the design's signature pill-shaped toolbar. Compose with button(variant=Ghost), segmented, dropdown_menu and toolbar_divider.

    toolbar_divider

    fn toolbar_divider(style? : Array[String]) ->
    Html

    The thin vertical separator used between control groups inside a toolbar.