View Source PhoenixDuskmoon.Table (PhoenixDuskmoon v4.4.0)
Render table.
Link to this section Summary
Functions
Generates a table.
Link to this section Functions
Generates a table.
examples
Examples
<.dm_table data={[
%{
name: "Shmi Skywalker",
portrayal: "Pernilla August (Episodes I-II)"
},
%{
name: "Luke Skywalker",
portrayal: "Mark Hamill (Episodes IV-IX, The Mandalorian, The Book of Boba Fett)"}
]}
>
<:caption>Skywalker House</:catption>
<:col :let={r} label="Name" label_class="text-teal-600" class="text-teal-400">
<%= r.name %>
</:col>
<:col :let={r} label="Portrayal">
<%= r.portrayal %>
</:col>
</.dm_table>
attributes
Attributes
id
(:any
) - html attribute id. Defaults tofalse
.class
(:any
) - html attribute class. Defaults to""
.data
(:list
) - table data list. Defaults to[]
.
slots
Slots
caption
- render a caption of table.Example
Accepts attributes:<:caption> Table information </:caption>
id
(:any
) - table caption id.class
(:any
) - table caption class.
col
- render a column of table.Example
Accepts attributes:<:col :let={r} label="Name"> <%= r.name %> </:col>
label
(:string
) - table column title.label_class
(:any
) - table column title title.class
(:any
) - table row column class.