Table

Skywalker House
Shmi Skywalker Pernilla August (Episodes I-II) Voice: Pernilla August (The Clone Wars)
Luke Skywalker Mark Hamill (Episodes IV-IX, The Mandalorian, The Book of Boba Fett), Aidan Barton (Episode III), Grant Feely (Obi-Wan Kenobi) Body Doubles: Lukaz Leong (Episode IX), Max Lloyd-Jones (The Mandalorian), Graham Hamilton (The Book of Boba Fett) Voice: Mark Hamill (Forces of Destiny)
Attribute Type Documentation Default Value
id :any html attribute id false
class :any html attribute class ""
border :boolean show table border false
data :list table data list []
stream :boolean stream data false
caption :slot render a caption of table. Example ```heex <:caption> Table information </:caption> ```
<:caption class="text-2xl text-slate-700 py-4">Skywalker House</:caption>
col :slot render a column of table. Example ```heex <:col :let={r} label="Name"> <%= r.name %> </:col> ```
<:col :let={r} label="Name" label_class="text-sky-600" class="align-top">
  <%= r.name %>
</:col>
<:col :let={r} label="Portrayal" class="align-top">
  <%= r.portrayal %>
</:col>
<:col :let={r} label="" class="align-top">
  <button class="btn" phx-click={JS.toggle_class("hidden", to: "tr:has(#description-#{Map.get(r, :id)})")}>
    Expand
  </button>
</:col>
<:expand :let={r} class={["align-top", "hidden"]}>
  <pre id={"description-#{Map.get(r, :id)}"} class="p-4 whitespace-break-spaces">
    <%= r.description %>
  </pre>
</:expand>
expand :slot render a one column row after each row of table. Example ```heex <:expand :let={r} label="Name"> <pre> <%= r.description %> </pre> </:expand> ```
<:col :let={r} label="Name" label_class="text-sky-600" class="align-top">
  <%= r.name %>
</:col>
<:col :let={r} label="Portrayal" class="align-top">
  <%= r.portrayal %>
</:col>
<:col :let={r} label="" class="align-top">
  <button class="btn" phx-click={JS.toggle_class("hidden", to: "tr:has(#description-#{Map.get(r, :id)})")}>
    Expand
  </button>
</:col>
<:expand :let={r} class={["align-top", "hidden"]}>
  <pre id={"description-#{Map.get(r, :id)}"} class="p-4 whitespace-break-spaces">
    <%= r.description %>
  </pre>
</:expand>