View Source Phoenix.UI.Components.Table (Phoenix UI v0.1.5)
Provides a table components.
Link to this section Summary
Functions
Renders table component.
Renders body in table.
Renders standard data cell in table.
Renders footer in table.
Renders header cell in table.
Renders header in table.
Renders row in table.
Link to this section Functions
@spec table(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders table component.
examples
Examples
```
<.table>
<.tr>
<.th>Month</.th>
<.th>Savings</.th>
</.tr>
<.tr>
<.td>January</.td>
<.td>$100</.td>
</.tr>
</.table>
```
@spec tbody(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders body in table.
examples
Examples
```
<.table>
<.tbody>
<.tr>
<.td>Cell A</.td>
<.td>Cell B</.td>
</.tr>
</.tbody>
</.table>
```
@spec td(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders standard data cell in table.
examples
Examples
```
<.table>
<.tr>
<.td>Cell A</.td>
<.td>Cell B</.td>
</.tr>
</.table>
```
@spec tfoot(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders footer in table.
examples
Examples
```
<.table>
<.tfoot>
<.tr>
<.th>Sum</.th>
<.th>$180</.th>
</.tr>
</.tfoot>
</.table>
```
@spec th(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders header cell in table.
examples
Examples
```
<.table>
<.thead>
<.tr>
<.th>Month</.th>
<.th>Savings</.th>
</.tr>
</.thead>
</.table>
```
@spec thead(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders header in table.
examples
Examples
```
<.table>
<.thead>
...
</.thead>
</.table>
```
@spec tr(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders row in table.
examples
Examples
```
<.table>
<.tr>
...
</.tr>
</.table>
```