Table

Team members and access levels
Name Email Role Status Actions
Alice Smith alice@example.com Admin Active
Bob Jones bob@example.com Editor Active
Charlie Brown charlie@example.com Viewer Inactive
Diana Prince diana@example.com Editor Active
Attribute Type Documentation Default Value
Required id * :string
Required rows * :list
row_id :any
row_click :any
row_item :any &Function.identity/1
row_label :any
row_class :any

fn row_item -> class end — classes added to that one row. For state that

Read more Read less

lives in the DATA, not in the column: a low-stock row, a cancelled order. Without it the caller has to leave the component to say it.

caption :string
empty_label :string "No results."
rows_empty :boolean

Whether there are no rows, when the component cannot tell.

Read more Read less

It cannot tell for a LiveStream: a stream is not enumerable, so emptiness is simply not readable from it — and until 2026-08-21 a streamed table therefore NEVER showed its empty state. The table silently rendered nothing where it had a perfectly good "no results" row to give.

A caller that streams already knows the count (it ran the query), so it passes it here. nil keeps deriving it from rows, which is right for a plain list.

size :string

daisyUI table-* size; nil is md

zebra :boolean

every even row on base-200 (table-zebra)

false
pin_rows :boolean

the header row sticks to the top of the scrolling wrapper (table-pin-rows)

false
loading :boolean false
loading_label :string "Loading..."
actions_label :string "Actions"
class :any
rest :global
body_rest :map

Attributes for the <tbody> — most usefully the application's own

Read more Read less
%{}

phx-hook, e.g. a bulk-select hook that needs the DOM of every row.

It exists because an element can carry only ONE hook, and ExoTable used to sit here. It now sits on the wrapper (it delegates by closest anyway), so this slot in the DOM is free for the caller.

Required col * :slot
Show slot attributes Hide slot attributes
label :string
align :string
class :any
header_class :any
<:col :let={user} label="Name">{user.name}</:col>
<:col :let={user} label="Email">{user.email}</:col>
<:col :let={user} label="Role"><ExoUI.Components.badge variant={if user.role == "Admin", do: "primary", else: "secondary"}>{user.role}</ExoUI.Components.badge></:col>
<:col :let={user} label="Status" align="center"><ExoUI.Components.badge variant={if user.status == "Active", do: "success", else: "secondary"}>{user.status}</ExoUI.Components.badge></:col>
head_row :slot

Replaces the header row derived from :col.

For the header that a per-column label string cannot express — a "select all" checkbox in the first column, a sort control, a column spanning two. Mark your cells data-exo="table-head-cell" and they keep the table's own styling instead of each call site restating it.

Prefer :col labels. This is the exit, not the door.

head_after :slot

A second header row, one cell across every column, under the header: a form that belongs to the header rather than to a row, such as a bulk edit opened from the bar over the header.

action :slot
<:action :let={user}><ExoUI.Components.button size="sm" variant="ghost">{user.name}<ExoUI.Components.icon name="arrow-right" class="size-3" /></ExoUI.Components.button></:action>
empty :slot
loading_state :slot