LanternUI.Components.DescriptionList (LanternUI v0.8.2)

Copy Markdown View Source

Label/value pairs for a record's detail view — the <dl> every show page hand-rolls.

<.description_list>
  <:item label="Created">Jan 4, 2026</:item>
  <:item label="Host">Alex Smith</:item>
  <:item label="Description" wide>Long free text…</:item>
</.description_list>

<.description_list layout="dense">
  <:item label="Repo">enventory_new</:item>
  <:item label="Status">{@status}</:item>
</.description_list>

columns sets how many pairs sit side by side on a wide viewport; it always collapses to one column on narrow screens. layout="inline" puts the label beside its value instead of above it. layout="dense" is the inspector-rail grid (label column + value).

Summary

Functions

description_list(assigns)

Attributes

  • columns (:integer) - Pairs per row on wide viewports. Defaults to 2. Must be one of 1, 2, or 3.
  • layout (:string) - stacked puts the label above the value; inline puts it alongside; dense is the inspector rail. Defaults to "stacked". Must be one of "stacked", "inline", or "dense".
  • class (:any) - Extra classes merged onto the root element. Defaults to nil.
  • Global attributes are accepted. Arbitrary HTML attributes passed through.

Slots

  • item (required) - One label/value pair. Accepts attributes:
    • label (:string) (required) - The pair's label.
    • wide (:boolean) - Span every column — for long free text.
    • class (:any) - Extra classes merged onto this pair.