DaisyUIComponents.Table (DaisyUIComponents v0.8.4)
View SourceTable component
Summary
Functions
Renders a table with generic styling.
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
class(:any) - Defaults tonil.active(:boolean) - Defaults tofalse.hover(:boolean) - Defaults tofalse.- Global attributes are accepted.
Slots
inner_block
Functions
Renders a table with generic styling.
Examples
<.table id="users" rows={@users}>
<:col :let={user} label="id">{user.id}</:col>
<:col :let={user} label="username">{user.username}</:col>
</.table>or declaring the table components
<.table id="users">
<.thead>
<.tr>
<.th>id</.th>
<.th>username</.th>
</.tr>
</.thead>
<.tbody>
<.tr :for={user <- @users}>
<.td>{user.id}</.td>
<.td>{user.username}</.td>
</.tr>
</.tbody></.table>
Attributes
id(:string) - Defaults tonil.class(:any) - Defaults tonil.rows(:list)row_id(:any) - the function for generating the row id. Defaults tonil.row_click(:any) - the function for handling phx-click on each row. Defaults tonil.row_item(:any) - the function for mapping each row before calling the :col and :action slots. Defaults to&Function.identity/1.zebra(:boolean) - Defaults tofalse.size(:string) - Must be one of"xs","sm","md","lg", or"xl".- Global attributes are accepted.
Slots
col- Accepts attributes:class(:any)label(:string)
action- the slot for showing user actions in the last table column.inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
- Global attributes are accepted.
Slots
inner_block
Attributes
class(:any) - Defaults tonil.active(:boolean) - Defaults tofalse.hover(:boolean) - Defaults tofalse.- Global attributes are accepted.
Slots
inner_block