Templates / Application Application template Orders Orders with working filters and search, a sortable table with paging and bulk actions, a detail pane, CSV export, and loading, empty and error states.
Live preview Desktops have one layout. On phones and tablets the same markup can also lay itself out like a native app: preview on a phone or a tablet .
Code Copy it into a page of your app. Load the CSS and register the components once (see framework setup ); links point at routes like /orders that you replace with your own.
This template works: the page renders from data.ts (sample rows, replace them with your API) and behavior.ts makes its controls work. The behaviour file is the same in every framework.
HTML React Vue Svelte Solid Angular
orders.html prismora/orders/data.ts prismora/orders/behavior.ts
<script type="module">
import '@prismora/css';
import '@prismora/elements/alert';
import '@prismora/elements/app';
import '@prismora/elements/app-bar';
import '@prismora/elements/avatar';
import '@prismora/elements/badge';
import '@prismora/elements/breadcrumb';
import '@prismora/elements/button';
import '@prismora/elements/card';
import '@prismora/elements/data-table';
import '@prismora/elements/date-picker';
import '@prismora/elements/description-list';
import '@prismora/elements/dialog';
import '@prismora/elements/drawer';
import '@prismora/elements/empty-state';
import '@prismora/elements/icon';
import '@prismora/elements/indicator';
import '@prismora/elements/input';
import '@prismora/elements/menu';
import '@prismora/elements/nav';
import '@prismora/elements/number-input';
import '@prismora/elements/segmented';
import '@prismora/elements/select';
import '@prismora/elements/skeleton';
import '@prismora/elements/stat';
import '@prismora/elements/theme-settings';
import '@prismora/elements/theme-switch';
import '@prismora/elements/timeline';
import { registerIcons } from '@prismora/elements/icon';
import { barChart, bell, box, check, clock, columns as columnsIcon, creditCard, download, home, inbox, messageCircle, plus, refresh, rotateCcw, search, settings, shoppingCart, sparkles, truck, userPlus, users, wallet, x, zap } from '@prismora/icons';
import { data } from './prismora/orders/data';
import { setup } from './prismora/orders/behavior';
registerIcons([barChart, bell, box, check, clock, columnsIcon, creditCard, download, home, inbox, messageCircle, plus, refresh, rotateCcw, search, settings, shoppingCart, sparkles, truck, userPlus, users, wallet, x, zap]);
setup(document.body, data);
</script>
<pm-app mobile collapsible persist="lumen">
<aside class="pm-app-side" aria-label="Workspace">
<a href="/dashboard" class="pm-brand">
<pm-icon name="zap"></pm-icon>
<span class="pm-brand-name">Lumen</span>
</a>
<pm-nav label="Main">
<pm-nav-group label="Workspace">
<pm-nav-item href="/dashboard" label="Overview" icon="home"></pm-nav-item>
<pm-nav-item href="/orders" label="Orders" icon="box" count="12" count-label="{count} new" current></pm-nav-item>
<pm-nav-item href="/customer" label="Customers" icon="users"></pm-nav-item>
<pm-nav-item href="/inbox" label="Inbox" icon="inbox" count="4" count-label="{count} unread"></pm-nav-item>
</pm-nav-group>
<pm-nav-group label="Work">
<pm-nav-item href="/analytics" label="Analytics" icon="bar-chart"></pm-nav-item>
<pm-nav-item href="/projects" label="Projects" icon="columns"></pm-nav-item>
<pm-nav-item href="/chat" label="Chat" icon="message-circle"></pm-nav-item>
<pm-nav-item href="/assistant" label="Assistant" icon="sparkles"></pm-nav-item>
</pm-nav-group>
<pm-nav-group label="Admin">
<pm-nav-item href="/team" label="Team" icon="user-plus"></pm-nav-item>
<pm-nav-item href="/billing" label="Billing" icon="credit-card"></pm-nav-item>
<pm-nav-item href="/settings" label="Settings" icon="settings"></pm-nav-item>
</pm-nav-group>
</pm-nav>
<div class="pm-app-side-footer">
<pm-card class="pm-app-full" size="sm" surface="gradient">
<span class="pm-weight-semibold">Upgrade to Business</span>
<p class="pm-text-sm pm-muted">SSO, audit log and priority support.</p>
<pm-button slot="footer" size="sm" href="/pricing">See plans</pm-button>
</pm-card>
</div>
</aside>
<div class="pm-app-main">
<pm-app-bar nav-toggle back="/dashboard">
<pm-input slot="search" type="search" label="Search" hide-label placeholder="Search orders…" icon-start="search"></pm-input>
<pm-theme-switch slot="end" class="pm-site-wide" variant="toggle"></pm-theme-switch>
<pm-button slot="end" variant="ghost" tone="neutral" icon icon-start="settings" label="Display settings" commandfor="display-settings" command="--open"></pm-button>
<pm-indicator slot="end" count="3" label="{count} unread">
<pm-button variant="ghost" tone="neutral" icon icon-start="bell" label="Notifications" href="/notifications"></pm-button>
</pm-indicator>
<pm-button slot="end" variant="ghost" tone="neutral" icon label="Account menu" popovertarget="account-menu" aria-haspopup="menu">
<pm-avatar slot="start" name="Ada Lovelace" size="sm" status="online"></pm-avatar>
</pm-button>
<pm-menu slot="end" id="account-menu">
<a role="menuitem" href="/profile">Profile</a>
<a role="menuitem" href="/settings">Settings</a>
<hr>
<a role="menuitem" href="/sign-in">Sign out</a>
</pm-menu>
</pm-app-bar>
<main class="pm-app-content">
<header class="pm-page-header">
<div>
<pm-breadcrumb label="Breadcrumb">
<pm-breadcrumb-item href="/dashboard">Overview</pm-breadcrumb-item>
<pm-breadcrumb-item current>Orders</pm-breadcrumb-item>
</pm-breadcrumb>
<h1 class="pm-page-title">Orders</h1>
<p class="pm-text-sm pm-muted">Track, fulfil and refund orders from every channel.</p>
</div>
<div class="pm-page-actions">
<pm-button variant="outline" tone="neutral" icon-start="download" data-action="export">Export</pm-button>
<pm-button icon-start="plus" data-action="new">New order</pm-button>
</div>
</header>
<div class="pm-bento pm-gap-3">
<pm-card size="sm" data-span="3">
<pm-stat label="Orders" value="48" delta="+8.1%" trend="up" icon="box" description="last 60 days"></pm-stat>
</pm-card>
<pm-card size="sm" data-span="3">
<pm-stat label="Revenue" value="$8,463" delta="+12.4%" trend="up" icon="wallet" description="paid and shipped"></pm-stat>
</pm-card>
<pm-card size="sm" data-span="3">
<pm-stat label="To fulfil" value="28" delta="8 unpaid" trend="neutral" icon="clock" description="waiting for you"></pm-stat>
</pm-card>
<pm-card size="sm" data-span="3">
<pm-stat label="Refund rate" value="8.3%" delta="-0.3 pt" trend="down" inverse icon="rotate-ccw" description="of all orders"></pm-stat>
</pm-card>
</div>
<section class="pm-section" aria-label="Order list">
<div class="pm-filter-bar">
<pm-segmented label="Status" value="all" size="sm" data-ref="status">
<pm-segment value="all">
All
<span class="pm-text-xs pm-muted pm-tabular">48</span>
</pm-segment>
<pm-segment value="Pending">
Pending
<span class="pm-text-xs pm-muted pm-tabular">8</span>
</pm-segment>
<pm-segment value="Paid">
Paid
<span class="pm-text-xs pm-muted pm-tabular">20</span>
</pm-segment>
<pm-segment value="Shipped">
Shipped
<span class="pm-text-xs pm-muted pm-tabular">12</span>
</pm-segment>
<pm-segment value="Refunded">
Refunded
<span class="pm-text-xs pm-muted pm-tabular">4</span>
</pm-segment>
<pm-segment value="Cancelled">
Cancelled
<span class="pm-text-xs pm-muted pm-tabular">4</span>
</pm-segment>
</pm-segmented>
<div class="pm-filter-group" style="--pm-filter-min: 39rem">
<pm-input type="search" label="Search orders" hide-label placeholder="Order, customer or city" icon-start="search" size="sm" clearable data-ref="search"></pm-input>
<pm-select label="Channel" hide-label size="sm" value="all" options='[{"value":"all","label":"All channels"},{"value":"Web","label":"Web"},{"value":"App","label":"App"},{"value":"Store","label":"Store"}]' data-ref="channel"></pm-select>
<pm-date-picker label="Dates" hide-label range size="sm" placeholder="Any date" data-ref="dates"></pm-date-picker>
<pm-button variant="ghost" tone="neutral" size="sm" icon icon-start="refresh" label="Refresh" data-action="refresh"></pm-button>
</div>
</div>
<div class="pm-stack" data-state="ready" data-ref="region">
<pm-data-table data-show="ready" data-ref="table" label="Orders" row-key="id" selectable row-clickable column-picker stack="auto" page-size="10" page-sizes='[10,25,50]' columns='[{"key":"id","label":"Order","sortable":true},{"key":"customer","label":"Customer","sortable":true,"stack":"title"},{"key":"date","label":"Date","type":"date","sortable":true},{"key":"channel","label":"Channel","sortable":true,"stack":"hide"},{"key":"status","label":"Status","type":"badge","sortable":true,"tones":{"Paid":"success","Shipped":"info","Pending":"warning","Refunded":"neutral","Cancelled":"danger"}},{"key":"items","label":"Items","type":"number","align":"end","sortable":true,"stack":"hide"},{"key":"total","label":"Total","type":"currency","align":"end","sortable":true,"aggregate":"sum"}]' rows='[{"id":"#4821","customer":"Grace Hopper","email":"[email protected] ","city":"New York","date":"2026-12-02","channel":"Web","status":"Shipped","items":1,"total":24},{"id":"#4820","customer":"Dennis Ritchie","email":"[email protected] ","city":"Berkeley","date":"2026-12-01","channel":"App","status":"Shipped","items":4,"total":159},{"id":"#4819","customer":"Annie Easley","email":"[email protected] ","city":"Cleveland","date":"2026-11-30","channel":"Web","status":"Paid","items":2,"total":294},{"id":"#4818","customer":"Tim Berners-Lee","email":"[email protected] ","city":"Geneva","date":"2026-11-29","channel":"Store","status":"Paid","items":5,"total":429},{"id":"#4817","customer":"Frances Allen","email":"[email protected] ","city":"Albany","date":"2026-11-27","channel":"Web","status":"Cancelled","items":3,"total":564},{"id":"#4816","customer":"Linus Torvalds","email":"[email protected] ","city":"Helsinki","date":"2026-11-26","channel":"App","status":"Shipped","items":1,"total":150},{"id":"#4815","customer":"Radia Perlman","email":"[email protected] ","city":"Seattle","date":"2026-11-25","channel":"Web","status":"Pending","items":4,"total":285},{"id":"#4814","customer":"Alan Turing","email":"[email protected] ","city":"London","date":"2026-11-23","channel":"App","status":"Paid","items":2,"total":420},{"id":"#4813","customer":"Barbara Liskov","email":"[email protected] ","city":"Los Angeles","date":"2026-11-22","channel":"Web","status":"Refunded","items":5,"total":555},{"id":"#4812","customer":"John Backus","email":"[email protected] ","city":"Philadelphia","date":"2026-11-21","channel":"Store","status":"Paid","items":3,"total":141},{"id":"#4811","customer":"Hedy Lamarr","email":"[email protected] ","city":"Vienna","date":"2026-11-19","channel":"Web","status":"Pending","items":1,"total":276},{"id":"#4810","customer":"Edsger Dijkstra","email":"[email protected] ","city":"Rotterdam","date":"2026-11-18","channel":"App","status":"Paid","items":4,"total":411},{"id":"#4809","customer":"Margaret Hamilton","email":"[email protected] ","city":"Boston","date":"2026-11-17","channel":"Web","status":"Shipped","items":2,"total":546},{"id":"#4808","customer":"Ken Thompson","email":"[email protected] ","city":"New Orleans","date":"2026-11-16","channel":"App","status":"Shipped","items":5,"total":132},{"id":"#4807","customer":"Katherine Johnson","email":"[email protected] ","city":"Houston","date":"2026-11-14","channel":"Web","status":"Paid","items":3,"total":267},{"id":"#4806","customer":"Donald Knuth","email":"[email protected] ","city":"Milwaukee","date":"2026-11-13","channel":"Store","status":"Paid","items":1,"total":402},{"id":"#4805","customer":"Grace Hopper","email":"[email protected] ","city":"New York","date":"2026-11-12","channel":"Web","status":"Cancelled","items":4,"total":537},{"id":"#4804","customer":"Dennis Ritchie","email":"[email protected] ","city":"Berkeley","date":"2026-11-10","channel":"App","status":"Shipped","items":2,"total":123},{"id":"#4803","customer":"Annie Easley","email":"[email protected] ","city":"Cleveland","date":"2026-11-09","channel":"Web","status":"Pending","items":5,"total":258},{"id":"#4802","customer":"Tim Berners-Lee","email":"[email protected] ","city":"Geneva","date":"2026-11-08","channel":"App","status":"Paid","items":3,"total":393},{"id":"#4801","customer":"Frances Allen","email":"[email protected] ","city":"Albany","date":"2026-11-06","channel":"Web","status":"Refunded","items":1,"total":528},{"id":"#4800","customer":"Linus Torvalds","email":"[email protected] ","city":"Helsinki","date":"2026-11-05","channel":"Store","status":"Paid","items":4,"total":114},{"id":"#4799","customer":"Radia Perlman","email":"[email protected] ","city":"Seattle","date":"2026-11-04","channel":"Web","status":"Pending","items":2,"total":249},{"id":"#4798","customer":"Alan Turing","email":"[email protected] ","city":"London","date":"2026-11-03","channel":"App","status":"Paid","items":5,"total":384},{"id":"#4797","customer":"Barbara Liskov","email":"[email protected] ","city":"Los Angeles","date":"2026-11-01","channel":"Web","status":"Shipped","items":3,"total":519},{"id":"#4796","customer":"John Backus","email":"[email protected] ","city":"Philadelphia","date":"2026-10-31","channel":"App","status":"Shipped","items":1,"total":105},{"id":"#4795","customer":"Hedy Lamarr","email":"[email protected] ","city":"Vienna","date":"2026-10-30","channel":"Web","status":"Paid","items":4,"total":240},{"id":"#4794","customer":"Edsger Dijkstra","email":"[email protected] ","city":"Rotterdam","date":"2026-10-28","channel":"Store","status":"Paid","items":2,"total":375},{"id":"#4793","customer":"Margaret Hamilton","email":"[email protected] ","city":"Boston","date":"2026-10-27","channel":"Web","status":"Cancelled","items":5,"total":510},{"id":"#4792","customer":"Ken Thompson","email":"[email protected] ","city":"New Orleans","date":"2026-10-26","channel":"App","status":"Shipped","items":3,"total":96},{"id":"#4791","customer":"Katherine Johnson","email":"[email protected] ","city":"Houston","date":"2026-10-24","channel":"Web","status":"Pending","items":1,"total":231},{"id":"#4790","customer":"Donald Knuth","email":"[email protected] ","city":"Milwaukee","date":"2026-10-23","channel":"App","status":"Paid","items":4,"total":366},{"id":"#4789","customer":"Grace Hopper","email":"[email protected] ","city":"New York","date":"2026-10-22","channel":"Web","status":"Refunded","items":2,"total":501},{"id":"#4788","customer":"Dennis Ritchie","email":"[email protected] ","city":"Berkeley","date":"2026-10-21","channel":"Store","status":"Paid","items":5,"total":87},{"id":"#4787","customer":"Annie Easley","email":"[email protected] ","city":"Cleveland","date":"2026-10-19","channel":"Web","status":"Pending","items":3,"total":222},{"id":"#4786","customer":"Tim Berners-Lee","email":"[email protected] ","city":"Geneva","date":"2026-10-18","channel":"App","status":"Paid","items":1,"total":357},{"id":"#4785","customer":"Frances Allen","email":"[email protected] ","city":"Albany","date":"2026-10-17","channel":"Web","status":"Shipped","items":4,"total":492},{"id":"#4784","customer":"Linus Torvalds","email":"[email protected] ","city":"Helsinki","date":"2026-10-15","channel":"App","status":"Shipped","items":2,"total":78},{"id":"#4783","customer":"Radia Perlman","email":"[email protected] ","city":"Seattle","date":"2026-10-14","channel":"Web","status":"Paid","items":5,"total":213},{"id":"#4782","customer":"Alan Turing","email":"[email protected] ","city":"London","date":"2026-10-13","channel":"Store","status":"Paid","items":3,"total":348},{"id":"#4781","customer":"Barbara Liskov","email":"[email protected] ","city":"Los Angeles","date":"2026-10-11","channel":"Web","status":"Cancelled","items":1,"total":483},{"id":"#4780","customer":"John Backus","email":"[email protected] ","city":"Philadelphia","date":"2026-10-10","channel":"App","status":"Shipped","items":4,"total":69},{"id":"#4779","customer":"Hedy Lamarr","email":"[email protected] ","city":"Vienna","date":"2026-10-09","channel":"Web","status":"Pending","items":2,"total":204},{"id":"#4778","customer":"Edsger Dijkstra","email":"[email protected] ","city":"Rotterdam","date":"2026-10-08","channel":"App","status":"Paid","items":5,"total":339},{"id":"#4777","customer":"Margaret Hamilton","email":"[email protected] ","city":"Boston","date":"2026-10-06","channel":"Web","status":"Refunded","items":3,"total":474},{"id":"#4776","customer":"Ken Thompson","email":"[email protected] ","city":"New Orleans","date":"2026-10-05","channel":"Store","status":"Paid","items":1,"total":60},{"id":"#4775","customer":"Katherine Johnson","email":"[email protected] ","city":"Houston","date":"2026-10-04","channel":"Web","status":"Pending","items":4,"total":195},{"id":"#4774","customer":"Donald Knuth","email":"[email protected] ","city":"Milwaukee","date":"2026-10-02","channel":"App","status":"Paid","items":2,"total":330}]'>
<span slot="toolbar" class="pm-text-sm pm-muted" role="status" data-ref="summary">48 orders</span>
<pm-button slot="toolbar" variant="link" size="sm" data-action="clear" data-ref="clear" hidden>Clear filters</pm-button>
<pm-button slot="toolbar" size="sm" variant="soft" icon-start="check" data-action="bulk-paid" data-bulk hidden>Mark as paid</pm-button>
<pm-button slot="toolbar" size="sm" variant="soft" tone="neutral" icon-start="download" data-action="bulk-export" data-bulk hidden>Export selected</pm-button>
</pm-data-table>
<div class="pm-card pm-stack" data-show="loading" role="status" aria-label="Loading orders">
<pm-skeleton shape="text" lines="2"></pm-skeleton>
<pm-skeleton height="14rem"></pm-skeleton>
<pm-skeleton shape="text" lines="2"></pm-skeleton>
</div>
<pm-empty-state data-show="empty" bordered icon="search" heading="No orders match" heading-level="2" description="Try another status, a wider date range or fewer words.">
<pm-button variant="outline" tone="neutral" data-action="clear">Clear filters</pm-button>
</pm-empty-state>
<pm-alert data-show="error" tone="danger" heading="Orders could not be loaded">
The server did not answer. Your filters are kept.
<pm-button slot="actions" size="sm" tone="danger" variant="outline" data-action="refresh">Try again</pm-button>
</pm-alert>
</div>
</section>
</main>
</div>
<aside class="pm-app-detail" aria-label="Order">
<div class="pm-stack pm-gap-5">
<header class="pm-cluster pm-items-start">
<div class="pm-stack pm-gap-1 pm-grow">
<h2 class="pm-section-title" data-ref="detail-title">Order</h2>
<span class="pm-text-sm pm-muted" data-ref="detail-meta"></span>
</div>
<pm-badge data-ref="detail-status">Paid</pm-badge>
<pm-button variant="ghost" tone="neutral" size="sm" icon icon-start="x" label="Close order" data-action="close-detail"></pm-button>
</header>
<div class="pm-cluster">
<pm-avatar data-ref="detail-avatar" name="Customer"></pm-avatar>
<div class="pm-stack pm-gap-0 pm-grow">
<strong data-ref="detail-customer"></strong>
<span class="pm-text-sm pm-muted" data-ref="detail-email"></span>
</div>
</div>
<pm-description-list divided label="Order details">
<pm-description-item label="Items">
<span data-ref="detail-items"></span>
</pm-description-item>
<pm-description-item label="Ships to">
<span data-ref="detail-city"></span>
</pm-description-item>
<pm-description-item label="Channel">
<span data-ref="detail-channel"></span>
</pm-description-item>
<pm-description-item label="Total">
<strong data-ref="detail-total"></strong>
</pm-description-item>
</pm-description-list>
<pm-timeline label="Order history">
<pm-timeline-item heading="Order placed" icon="shopping-cart">
<span data-ref="detail-placed"></span>
</pm-timeline-item>
<pm-timeline-item heading="Payment" icon="credit-card">
<span data-ref="detail-payment"></span>
</pm-timeline-item>
<pm-timeline-item heading="Delivery" icon="truck">
<span data-ref="detail-delivery"></span>
</pm-timeline-item>
</pm-timeline>
<div class="pm-action-bar">
<pm-button variant="outline" tone="danger" data-action="refund">Refund</pm-button>
<pm-button data-action="mark-paid">Mark as paid</pm-button>
</div>
</div>
</aside>
</pm-app>
<pm-drawer id="display-settings" heading="Display settings" description="Saved in this browser." side="end">
<pm-theme-settings></pm-theme-settings>
</pm-drawer>
<pm-dialog heading="New order" description="Create an order by hand, for a sale made by phone or in person." data-ref="new-order">
<form class="pm-stack" data-ref="new-form">
<pm-input name="customer" label="Customer" placeholder="Full name" required></pm-input>
<pm-input name="email" type="email" label="Email" placeholder="[email protected] " required></pm-input>
<div class="pm-field-row">
<pm-number-input name="items" label="Items" value="1" min="1" max="99"></pm-number-input>
<pm-number-input name="total" label="Total (USD)" value="120" min="1" step="1"></pm-number-input>
</div>
<pm-select name="channel" label="Channel" value="Store" options='["Web","App","Store"]'></pm-select>
<div class="pm-cluster pm-justify-end">
<pm-button type="button" variant="ghost" tone="neutral" data-action="cancel-new">Cancel</pm-button>
<pm-button type="submit">Create order</pm-button>
</div>
</form>
</pm-dialog> With the CLI npx @prismora/cli add orders --write Writes the page into your routes folder and both files into prismora/orders/.
With an AI agent (MCP) scaffold_page({ pattern: "orders", framework: "html" }) Components in this template