OfferLifetime Pro for $99

Orders Table

Order number, customer, item count, fulfilment and total. Each row opens in place to show its line items, quantity × price and the total, worked out from the lines so the two can never disagree.

Data TablesBlockProLifetime access218 lines · one file

The decision inside it

The breakdown is one click, not one page

Checking what was in an order is the most common reason to open it, so the lines open under the row. The chevron is its own button; the rest of the row still opens the order.

When to use it

Use Orders Table for orders with fulfilment status, where each row opens in place to its line items. Totals are worked out from the lines. For payments without line items use Payments Table.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Orders Table for this.
Install it: npx shadcn@latest add @layro/orders-table
(the @layro registry is set up in components.json, with LAYRO_KEY in .env.local)
Import it from @/components/ui/orders-table.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

Usage

components/orders.tsx
import { OrdersTable, type Order } from "@/components/ui/orders-table";

export function Orders({ rows }: { rows: Order[] }) {
  return (
    <OrdersTable
      rows={rows}
      currency="USD"
      onBulkAction={(action, selected) => console.info(action, selected.map((o) => o.number))}
    />
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
rowsrequiredOrder[]—
currencystringISO 4217 code. Default "USD".
loadingboolean—
errorReact.ReactNode—
onRetry() => void—
onRowClick(row: Order) => void—
selectablebooleanCheckboxes and the bulk bar. Default true.
onBulkAction(action: OrderBulkAction, rows: Order[]) => void—
density"comfortable" | "compact"—
variant"default" | "striped" | "bordered"—
pageSizenumberRows per page. Default 8.
classNamestring—

Dependencies

npm packages

lucide-react

Layro foundations, installed alongside it

layro-themebadgebuttondata-table

States

All of them are drawn by the component. None is left for you to design.

  • All orders
  • Row opened to line items
  • Unfulfilled queue
  • Compact, striped
  • Loading
  • Empty
  • Error

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances

Lifetime access

Every component, and everything we ship next.

  • All 232 components, source included
  • Every template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.