Table

Loading members
Name Email
Loading member rows...
<div style="padding: 1rem; display: grid; gap: 2rem;">
  <.table id="table-single-loading" loading rows={[]} caption="Loading members">
    <:col label="Name">Name</:col>
    <:col label="Email">Email</:col>
    <:loading_state>Loading member rows...</:loading_state>
  </.table>
</div>
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
<div style="padding: 1rem; display: grid; gap: 2rem;">
  <.table
    id="table-single-users"
    rows={[%{id: 1, name: "Alice Smith", status: "Active", email: "alice@example.com", role: "Admin"}, %{id: 2, name: "Bob Jones", status: "Active", email: "bob@example.com", role: "Editor"}, %{id: 3, name: "Charlie Brown", status: "Inactive", email: "charlie@example.com", role: "Viewer"}, %{id: 4, name: "Diana Prince", status: "Active", email: "diana@example.com", role: "Editor"}]}
    row_id={&Storybook.Components.Table.row_id/1}
    caption="Team members and access levels"
    row_label={&Storybook.Components.Table.row_label/1}
  >
    <: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>
    <: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>
  </.table>
</div>
Archived members
Name Email
No archived members.
<div style="padding: 1rem; display: grid; gap: 2rem;">
  <.table id="table-single-empty" rows={[]} caption="Archived members">
    <:col label="Name">Name</:col>
    <:col label="Email">Email</:col>
    <:empty>No archived members.</:empty>
  </.table>
</div>