Resource List

Columns
Order Date Customer Total
#1001 Oct 24 Ana Anić €42.00
#1002 Oct 23 Bojan Bojić €18.50
#1003 Oct 22 Cvijeta Cvijić €120.00
<div style="padding: 1rem; width: 100%; box-sizing: border-box;">
  <.resource_list
    id="resource-list-single-toolbar"
    list="orders"
    sort={%{dir: "desc", key: "date"}}
    search={%{name: "search", value: ""}}
    columns={[%{label: "Customer", key: "customer"}, %{label: "Total", key: "total"}]}
    rows={[%{id: 1001, total: "€42.00", date: "Oct 24", customer: "Ana Anić"}, %{id: 1002, total: "€18.50", date: "Oct 23", customer: "Bojan Bojić"}, %{id: 1003, total: "€120.00", date: "Oct 22", customer: "Cvijeta Cvijić"}]}
    views={[%{label: "All", key: "all", patch: "#all"}, %{count: 2, label: "Unfulfilled", key: "unfulfilled", patch: "#unfulfilled"}, %{label: "Unpaid", key: "unpaid", patch: "#unpaid"}]}
    row_id={&Storybook.Components.ResourceList.dom_id/1}
    active_view="all"
    search_placeholder="Search or type a sentence"
    addable={[%{label: "Status", key: "status"}, %{label: "From", key: "from"}]}
    sort_patch={&Storybook.Components.ResourceList.sort_patch/2}
  >
    <:col :let={order} label="Order"><a href="#" data-row-link>#{order.id}</a></:col>
    <:col :let={order} label="Date" sort="date" sort_first="desc">{order.date}</:col>
    <:col :let={order} label="Customer" key="customer" sort="customer">{order.customer}</:col>
    <:col :let={order} label="Total" key="total" align="right">{order.total}</:col>
  </.resource_list>
</div>
Status
Choose
Paid
Pending
From
Columns
Order Date Customer Total
#1001 Oct 24 Ana Anić €42.00
#1002 Oct 23 Bojan Bojić €18.50
#1003 Oct 22 Cvijeta Cvijić €120.00
<div style="padding: 1rem; width: 100%; box-sizing: border-box;">
  <.resource_list
    id="resource-list-single-filtered"
    list="orders"
    search={%{name: "search", value: ""}}
    columns={[%{label: "Customer", key: "customer"}, %{label: "Total", key: "total"}]}
    rows={[%{id: 1001, total: "€42.00", date: "Oct 24", customer: "Ana Anić"}, %{id: 1002, total: "€18.50", date: "Oct 23", customer: "Bojan Bojić"}, %{id: 1003, total: "€120.00", date: "Oct 22", customer: "Cvijeta Cvijić"}]}
    views={[%{label: "All", key: "all", patch: "#all"}, %{count: 2, label: "Unfulfilled", key: "unfulfilled", patch: "#unfulfilled"}, %{label: "Unpaid", key: "unpaid", patch: "#unpaid"}]}
    row_id={&Storybook.Components.ResourceList.dom_id/1}
    save_view={:offer}
    active_view={nil}
    search_placeholder="Search or type a sentence"
    filtered?
    chips={[%{label: "Status", type: :select, value: "paid", options: [{"Paid", "paid"}, {"Pending", "pending"}], key: "status"}, %{label: "From", type: :date, value: "2026-10-01", key: "from"}]}
    addable={[%{label: "Total", key: "total"}]}
    sort_patch={&Storybook.Components.ResourceList.sort_patch/2}
  >
    <:col :let={order} label="Order"><a href="#" data-row-link>#{order.id}</a></:col>
    <:col :let={order} label="Date" sort="date" sort_first="desc">{order.date}</:col>
    <:col :let={order} label="Customer" key="customer" sort="customer">{order.customer}</:col>
    <:col :let={order} label="Total" key="total" align="right">{order.total}</:col>
  </.resource_list>
</div>
Columns
#1001 Oct 24 Ana Anić €42.00
#1002 Oct 23 Bojan Bojić €18.50
#1003 Oct 22 Cvijeta Cvijić €120.00
<div style="padding: 1rem; width: 100%; box-sizing: border-box;">
  <.resource_list
    id="resource-list-single-selected"
    list="orders"
    search={%{name: "search", value: ""}}
    columns={[%{label: "Customer", key: "customer"}, %{label: "Total", key: "total"}]}
    rows={[%{id: 1001, total: "€42.00", date: "Oct 24", customer: "Ana Anić"}, %{id: 1002, total: "€18.50", date: "Oct 23", customer: "Bojan Bojić"}, %{id: 1003, total: "€120.00", date: "Oct 22", customer: "Cvijeta Cvijić"}]}
    views={[%{label: "All", key: "all", patch: "#all"}, %{count: 2, label: "Unfulfilled", key: "unfulfilled", patch: "#unfulfilled"}, %{label: "Unpaid", key: "unpaid", patch: "#unpaid"}]}
    row_id={&Storybook.Components.ResourceList.dom_id/1}
    selection={Storybook.Components.ResourceList.selection()}
    active_view="all"
    search_placeholder="Search or type a sentence"
    addable={[%{label: "Status", key: "status"}, %{label: "From", key: "from"}]}
    sort_patch={&Storybook.Components.ResourceList.sort_patch/2}
  >
    <:col :let={order} label="Order"><a href="#" data-row-link>#{order.id}</a></:col>
    <:col :let={order} label="Date" sort="date" sort_first="desc">{order.date}</:col>
    <:col :let={order} label="Customer" key="customer" sort="customer">{order.customer}</:col>
    <:col :let={order} label="Total" key="total" align="right">{order.total}</:col>
    <:bulk_action click="fulfil" icon="truck">Mark as fulfilled</:bulk_action>
    <:bulk_action click="print" icon="printer">Print packing slips</:bulk_action>
    <:bulk_more click="export">Export</:bulk_more>
    <:bulk_action click="archive" variant="danger" confirm="Archive the selected orders?">Archive</:bulk_action>
  </.resource_list>
</div>
Columns
Order Date Customer Total
No unpaid orders.
<div style="padding: 1rem; width: 100%; box-sizing: border-box;">
  <.resource_list
    id="resource-list-single-empty"
    list="orders"
    search={%{name: "search", value: ""}}
    columns={[%{label: "Customer", key: "customer"}, %{label: "Total", key: "total"}]}
    rows={[]}
    views={[%{label: "All", key: "all", patch: "#all"}, %{count: 2, label: "Unfulfilled", key: "unfulfilled", patch: "#unfulfilled"}, %{label: "Unpaid", key: "unpaid", patch: "#unpaid"}]}
    row_id={&Storybook.Components.ResourceList.dom_id/1}
    active_view="unpaid"
    search_placeholder="Search or type a sentence"
    addable={[%{label: "Status", key: "status"}, %{label: "From", key: "from"}]}
    sort_patch={&Storybook.Components.ResourceList.sort_patch/2}
  >
    <:col :let={order} label="Order"><a href="#" data-row-link>#{order.id}</a></:col>
    <:col :let={order} label="Date" sort="date" sort_first="desc">{order.date}</:col>
    <:col :let={order} label="Customer" key="customer" sort="customer">{order.customer}</:col>
    <:col :let={order} label="Total" key="total" align="right">{order.total}</:col>
    <:empty>No unpaid orders.</:empty>
  </.resource_list>
</div>