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

Read more Read less
false
class :any

html attribute class

Read more Read less
""
border :boolean

show table border

Read more Read less
false
data :list

table data list

Read more Read less
[]
stream :boolean

stream data

false
caption :slot

render a caption of table.

Example

<:caption>
  Table information
</:caption>
Show slot attributes Hide slot attributes
id :any

table caption id

class :any

table caption class

<:caption class="text-2xl text-slate-700 py-4">Skywalker House</:caption>
col :slot

render a column of table.

Example

<:col :let={r} label="Name">
  <%= r.name %>
</:col>
Show slot attributes Hide slot attributes
label :string

table column title

label_class :any

table column title title

class :any

table row column class

<: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

<:expand :let={r} label="Name">
  <pre>
    <%= r.description %>
  </pre>
</:expand>
Show slot attributes Hide slot attributes
id :any

table row expand id

class :any

table row expand class

<: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>