LanternUI.Components.GroupBand (LanternUI v0.8.1)

Copy Markdown View Source

Tinted full-width group header: chevron · glyph · name · count · trailing action (the +).

<.group_band name="In progress" count={12}>
  <:glyph><.status_glyph status={:in_progress} /></:glyph>
  <:action navigate="/tickets/new?status=in_progress" label="New ticket in In progress">
    <.icon name="plus" />
  </:action>
</.group_band>

<.group_band name="Done" count={40} collapsed patch="/tickets?show_done=1">
  <:glyph><.status_glyph status={:done} /></:glyph>
</.group_band>

A collapsed band with navigate/patch/href makes the name row the expand control (chevron points right). Expanded bands show a down chevron.

Summary

Functions

group_band(assigns)

Attributes

  • name (:string) (required) - Group label (status name, section title).
  • count (:any) - Optional count shown after the name. Defaults to nil.
  • collapsed (:boolean) - When true, chevron points right. Defaults to false.
  • navigate (:string) - LiveView navigate on the name row. Defaults to nil.
  • patch (:string) - LiveView patch on the name row. Defaults to nil.
  • href (:any) - Href on the name row. Defaults to nil.
  • class (:any) - Extra classes merged onto the band. Defaults to nil.
  • Global attributes are accepted. Arbitrary HTML/phx-* attributes passed through.

Slots

  • glyph - Leading glyph (status circle, etc.).
  • action - Trailing control, typically a + that files into this group. Accepts attributes:
    • navigate (:string)
    • patch (:string)
    • href (:any)
    • label (:string)
    • class (:any)