Bento grids
Features in cells of mixed sizes, each with a small working picture of the product, numbers or charts. Tidy rows on desktop that fold to one column on phones, in every theme, light and dark.
4 blocks below, each one file and one command. They wear whichever DressCode theme you install, in light and dark.
Product features
Six cells of mixed spans, one wide, one tall and one wide again, each a feature with a small picture of it working.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/bento-grid-product.json// Bento grid, product: six cells of mixed sizes, each a feature with a small working picture of it. On
// desktop the portal spans two columns, the phone cell runs down two rows and the export spans two
// columns at the bottom; on tablets the grid is two across (the phone cell still runs down two rows) and
// on phones one. Cells in a row share a
// height, and each picture sits at the bottom of its cell so the bottoms line up. The pictures are drawn
// in markup so they wear the theme; they are hidden from screen readers and each cell's copy says what
// its picture shows.
import { CalendarCheck, Check, CreditCard, Download, Fingerprint, Landmark, Link2, Send } from "lucide-react"
import type { ReactNode } from "react"
import { cn } from "@/lib/utils"
const inset = "rounded-[calc(var(--radius)+4px)] border border-border bg-background"
function Cell({ className, title, body, children, visualClassName }: { className?: string; title: string; body: string; children: ReactNode; visualClassName?: string }) {
return (
<div className={cn("dc-card flex flex-col overflow-hidden", className)}>
<div className="p-6 pb-0 sm:p-7 sm:pb-0">
<h3 className="dc-h text-[20px] leading-snug sm:text-[22px]">{title}</h3>
<p className="mt-2 max-w-[440px] text-[15px] leading-relaxed text-pretty text-muted-foreground">{body}</p>
</div>
<div aria-hidden="true" className={cn("mt-auto p-6 pt-7 text-[13px] sm:p-7", visualClassName)}>
{children}
</div>
</div>
)
}
/** A switch drawn in the on position. */
function SwitchOn() {
return (
<span className="flex h-5 w-9 shrink-0 items-center justify-end rounded-full bg-primary p-0.5">
<span className="size-4 rounded-full bg-primary-foreground shadow-sm" />
</span>
)
}
const PORTAL = [
{ id: "INV-1040", what: "Website retainer, October", amount: "$1,200.00", status: "Paid" },
{ id: "INV-1042", what: "Brand identity", amount: "$4,200.00", status: "Due" },
{ id: "INV-1041", what: "Launch campaign", amount: "$1,860.00", status: "Overdue" },
] as const
const PILL = { Paid: "dc-pill-hl", Due: "dc-pill-line", Overdue: "dc-pill-danger" } as const
function PortalPicture() {
return (
<div className={cn(inset, "overflow-hidden")}>
<div className="flex items-center justify-between gap-3 border-b border-border px-4 py-3">
<p className="font-semibold">Fernwood Studio</p>
<span className="text-muted-foreground">3 invoices from Ada</span>
</div>
<ul>
{PORTAL.map((r) => (
<li key={r.id} className="flex items-center gap-3 border-b border-border px-4 py-2.5 last:border-b-0">
<span className="dc-num hidden text-muted-foreground sm:inline">{r.id}</span>
<span className="min-w-0 flex-1 truncate">{r.what}</span>
<span className="dc-num hidden sm:inline">{r.amount}</span>
<span className={cn("dc-pill", PILL[r.status])}>{r.status}</span>
<span
className={cn(
"inline-flex h-7 w-14 items-center justify-center rounded-[var(--radius)] font-semibold",
r.status === "Paid" ? "border border-input text-muted-foreground" : "bg-primary text-primary-foreground",
)}
>
{r.status === "Paid" ? "PDF" : "Pay"}
</span>
</li>
))}
</ul>
</div>
)
}
function PhonePicture() {
return (
<div className="mx-auto w-full max-w-[260px]">
<div className="mb-3 flex items-center gap-2.5 rounded-[calc(var(--radius)+4px)] border border-dashed border-input px-3 py-2.5 text-muted-foreground">
<CalendarCheck className="size-4 shrink-0" />
<span className="min-w-0 flex-1 truncate">Cake shoot done</span>
<span className="dc-num text-[12px]">2:05 pm</span>
</div>
<div className="rounded-[var(--dc-radius-card)] border border-border bg-background p-4 pb-5 shadow-sm">
<div className="flex items-center justify-between">
<p className="dc-h text-[16px]">New invoice</p>
<span className="dc-num text-[12px] text-muted-foreground">INV-1044</span>
</div>
<p className="mt-3 text-[11px] font-semibold text-muted-foreground">Client</p>
<p className="mt-1 flex h-9 items-center gap-2 rounded-[var(--radius)] border border-input px-2.5">
<span className="grid size-5 place-items-center rounded-full bg-muted text-[9px] font-bold">OB</span> Ola Bakery
</p>
<p className="mt-3 text-[11px] font-semibold text-muted-foreground">Work</p>
<ul className="mt-1 divide-y divide-border rounded-[var(--radius)] border border-border">
{[
["Cake shoot, half day", "$480.00"],
["Edited photos, 24", "$160.00"],
].map(([w, a]) => (
<li key={w} className="flex justify-between gap-2 px-2.5 py-2">
<span className="truncate">{w}</span>
<span className="dc-num">{a}</span>
</li>
))}
</ul>
<p className="mt-3 flex justify-between text-muted-foreground">
<span>Due</span>
<span className="text-foreground">In 14 days</span>
</p>
<div className="mt-2 flex items-baseline justify-between border-t border-border pt-2">
<span className="text-muted-foreground">Total</span>
<span className="dc-num text-[20px] font-semibold tracking-tight">$640.00</span>
</div>
<span className="mt-4 flex h-10 items-center justify-center gap-1.5 rounded-[var(--radius)] bg-primary font-semibold text-primary-foreground">
<Send className="size-3.5" /> Send now
</span>
</div>
<div className="relative z-10 -mt-3 ml-6 flex items-center gap-2.5 rounded-[calc(var(--radius)+4px)] border border-border bg-card p-2.5 shadow-md">
<span className="grid size-7 shrink-0 place-items-center rounded-full bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)]">
<Check className="size-3.5" strokeWidth={3} />
</span>
<span className="min-w-0">
<span className="block font-semibold">Ola opened it</span>
<span className="block text-[12px] text-muted-foreground">Two minutes after you sent it</span>
</span>
</div>
</div>
)
}
function MethodsPicture() {
return (
<ul className={cn(inset, "divide-y divide-border")}>
{[
{ icon: CreditCard, label: "Card", note: "2 working days" },
{ icon: Landmark, label: "Bank transfer", note: "2 working days" },
{ icon: Link2, label: "Payment link", note: "Share anywhere" },
].map(({ icon: Icon, label, note }) => (
<li key={label} className="flex items-center gap-3 px-4 py-2.5">
<Icon className="size-4 shrink-0 text-muted-foreground" />
<span className="min-w-0 flex-1">
<span className="block font-semibold">{label}</span>
<span className="block text-[12px] text-muted-foreground">{note}</span>
</span>
<SwitchOn />
</li>
))}
</ul>
)
}
function CurrencyPicture() {
return (
<div>
<div className="flex flex-wrap gap-1.5">
{["USD", "EUR", "GBP", "JPY", "CAD", "AUD", "SEK"].map((c, i) => (
<span key={c} className={cn("dc-pill dc-num", i === 1 ? "dc-pill-hl" : "dc-pill-line")}>
{c}
</span>
))}
<span className="dc-pill dc-pill-muted">+23</span>
</div>
<div className={cn(inset, "mt-4 flex items-center justify-between gap-2 rounded-b-none px-4 py-3")}>
<span>
<span className="block text-[12px] text-muted-foreground">Northlight pays</span>
<span className="dc-num font-semibold">€3,000.00</span>
</span>
<span className="h-px flex-1 border-t border-dashed border-input" />
<span className="text-right">
<span className="block text-[12px] text-muted-foreground">You get</span>
<span className="dc-num font-semibold">$3,248.10</span>
</span>
</div>
<p className="rounded-b-[calc(var(--radius)+4px)] border border-t-0 border-border bg-muted px-4 py-2 text-[12px] text-muted-foreground">
Rate fixed the day the invoice goes out
</p>
</div>
)
}
function SecurityPicture() {
return (
<div className={cn(inset, "overflow-hidden")}>
<div className="flex items-center gap-3 border-b border-border px-4 py-3">
<Fingerprint className="size-4 shrink-0 text-[color:var(--dc-accent)]" />
<span className="flex-1 font-semibold">Two-step sign-in</span>
<SwitchOn />
</div>
<ul className="divide-y divide-border">
{[
["AL", "Ada", "Owner"],
["SK", "Sam", "Bookkeeper"],
].map(([initials, name, role]) => (
<li key={name} className="flex items-center gap-3 px-4 py-2.5">
<span className="grid size-6 place-items-center rounded-full bg-muted text-[10px] font-bold">{initials}</span>
<span className="flex-1">{name}</span>
<span className="text-muted-foreground">{role}</span>
</li>
))}
</ul>
<p className="border-t border-border bg-muted px-4 py-2 text-[12px] text-muted-foreground">
Sam exported Q3 invoices, 2 hours ago
</p>
</div>
)
}
const EXPORT = [
["Jul 4", "INV-1031", "Juniper Labs", "$2,300.00"],
["Aug 12", "INV-1034", "Northlight", "$7,450.00"],
["Sep 29", "INV-1038", "Halcyon", "$980.00"],
]
function ExportPicture() {
return (
<div className={cn(inset, "overflow-hidden")}>
<div className="flex flex-wrap items-center justify-between gap-3 border-b border-border px-4 py-3">
<div className="flex gap-1 rounded-[var(--radius)] bg-muted p-[3px]">
{["Q1", "Q2", "Q3", "Q4"].map((q) => (
<span key={q} className={cn("rounded-[calc(var(--radius)-2px)] px-2.5 py-0.5", q === "Q3" ? "bg-card font-semibold shadow-sm" : "text-muted-foreground")}>
{q}
</span>
))}
</div>
<span className="inline-flex h-8 items-center gap-1.5 rounded-[var(--radius)] bg-primary px-3 font-semibold text-primary-foreground">
<Download className="size-3.5" /> Download CSV
</span>
</div>
<table className="w-full">
<tbody>
{EXPORT.map(([date, id, client, amount]) => (
<tr key={id} className="border-b border-border last:border-b-0">
<td className="dc-num py-2.5 pl-4 text-muted-foreground">{date}</td>
<td className="dc-num hidden py-2.5 pl-3 text-muted-foreground lg:table-cell">{id}</td>
<td className="py-2.5 pl-3">{client}</td>
<td className="dc-num py-2.5 pr-4 pl-3 text-right">{amount}</td>
</tr>
))}
</tbody>
</table>
</div>
)
}
export default function BentoGridProduct() {
return (
<section aria-labelledby="bento-grid-product-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="mx-auto max-w-[640px] text-center">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">And the rest</p>
<h2 id="bento-grid-product-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Small things that save whole afternoons
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-muted-foreground">The parts of Orbit nobody asks about until the day they need them.</p>
</div>
<div className="mt-14 grid gap-4 md:grid-cols-2 lg:grid-cols-3">
<Cell
className="md:col-span-2"
title="A portal for every client"
body="Clients see every invoice you sent them, download receipts and pay, without making an account."
>
<PortalPicture />
</Cell>
<Cell
className="md:row-span-2"
title="Send it from the job"
body="Finish the shoot, add the lines on your phone and send the invoice before you pack up."
visualClassName="flex flex-1 items-end justify-center"
>
<PhonePicture />
</Cell>
<Cell title="Cards and bank transfer" body="Turn on the ways you want to be paid. Money lands in two working days.">
<MethodsPicture />
</Cell>
<Cell title="30 currencies" body="Bill in your client's currency and get paid out in yours.">
<CurrencyPicture />
</Cell>
<Cell title="Locked down" body="Two-step sign-in, roles for your team and a log of every change.">
<SecurityPicture />
</Cell>
<Cell
className="lg:col-span-2"
title="Ready for tax time"
body="Every invoice and payment for the quarter in one tidy CSV your accountant will like."
>
<ExportPicture />
</Cell>
</div>
</div>
</section>
)
}Metrics and charts
Five cells built around one big number each, backed by a tiny chart: monthly bars, a progress ring, a sparkline, a split bar and weekday bars.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/bento-grid-metrics.json// Bento grid, metrics: five cells built around one big number each and a tiny chart that backs it up
// (monthly bars, a progress ring, a sparkline, a split bar and weekday bars). The numbers and the sentence
// under each are the content; the charts are drawn in divs and SVG in the theme's chart colors and are
// hidden from screen readers. Two rows on desktop (the first cell spans two columns), two across on
// tablets, one on phones.
import { ArrowRight } from "lucide-react"
import type { ReactNode } from "react"
import { cn } from "@/lib/utils"
function Cell({ className, label, value, note, children, tone = "card" }: { className?: string; label: string; value: string; note: ReactNode; children: ReactNode; tone?: "card" | "highlight" }) {
const hl = tone === "highlight"
return (
<div className={cn("dc-card flex flex-col p-6 sm:p-7", hl && "border-transparent bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)]", className)}>
<h3 className={cn("text-[15px] font-semibold", hl ? "opacity-85" : "text-muted-foreground")}>{label}</h3>
<p className="dc-h dc-num mt-3 text-[40px] leading-none sm:text-[46px]">{value}</p>
<p className={cn("mt-3 max-w-[340px] text-[15px] leading-snug", hl ? "opacity-85" : "text-muted-foreground")}>{note}</p>
<div aria-hidden="true" className="mt-auto pt-7">
{children}
</div>
</div>
)
}
const MONTHS = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"]
const COLLECTED = [11.2, 12.8, 12.1, 14.6, 13.9, 16.2, 15.4, 17.8, 16.9, 19.6, 21.4, 23]
function MonthBars() {
return (
<div>
<div className="flex h-[150px] items-end gap-[2.5%] border-b border-border">
{COLLECTED.map((v, i) => (
<span
key={i}
className={cn(
"flex-1 rounded-t-[4px]",
i === 10 ? "bg-[color:var(--chart-1)]" : i === 11 ? "border-2 border-b-0 border-dashed border-[color:var(--chart-1)]" : "bg-[color:color-mix(in_oklab,var(--chart-1)_45%,transparent)]",
)}
style={{ height: `${(v / 24) * 100}%` }}
/>
))}
</div>
<div className="mt-2 flex gap-[2.5%] text-center text-[11px] text-muted-foreground">
{MONTHS.map((m, i) => (
<span key={i} className={cn("flex-1", i === 10 && "font-semibold text-foreground")}>
{m}
</span>
))}
</div>
</div>
)
}
function Ring({ value }: { value: number }) {
const r = 52
const c = 2 * Math.PI * r
return (
<div className="relative size-[140px]">
<svg viewBox="0 0 128 128" className="size-full -rotate-90">
<circle cx="64" cy="64" r={r} fill="none" stroke="currentColor" strokeOpacity="0.18" strokeWidth="12" />
<circle cx="64" cy="64" r={r} fill="none" stroke="currentColor" strokeWidth="12" strokeLinecap="round" strokeDasharray={`${(value / 100) * c} ${c}`} />
</svg>
<span className="absolute inset-0 flex flex-col items-center justify-center leading-tight">
<span className="dc-num text-[20px] font-semibold">412</span>
<span className="text-[12px] opacity-80">invoices</span>
</span>
</div>
)
}
// Days to get paid, Jan to Nov, drawn into a 220 x 64 box (the last point stops short of the right edge so
// its dot stays inside the cell); fewer days sit lower, so the line falls.
const DAYS = [26, 24, 23, 21, 19, 18, 16, 15, 13, 12, 11]
const pts = DAYS.map((d, i) => [(i / (DAYS.length - 1)) * 214, 6 + ((28 - d) / 19) * 52] as const)
const LINE = pts.map(([x, y], i) => `${i ? "L" : "M"}${x.toFixed(1)} ${y.toFixed(1)}`).join(" ")
const AREA = `${LINE} L214 64 L0 64 Z`
function Sparkline() {
const [x, y] = pts[pts.length - 1]
return (
<div className="relative h-24">
<svg viewBox="0 0 220 64" preserveAspectRatio="none" className="absolute inset-0 size-full overflow-visible">
<path d={AREA} fill="var(--chart-1)" fillOpacity="0.14" />
<path d={LINE} fill="none" stroke="var(--chart-1)" strokeWidth="2.5" strokeLinejoin="round" strokeLinecap="round" vectorEffect="non-scaling-stroke" />
</svg>
<span
className="absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[color:var(--card)] bg-[color:var(--chart-1)]"
style={{ left: `${(x / 220) * 100}%`, top: `${(y / 64) * 100}%` }}
/>
</div>
)
}
const SOURCES = [
{ label: "Retainers", share: 46, color: "var(--chart-1)" },
{ label: "Projects", share: 38, color: "var(--chart-2)" },
{ label: "Rush jobs", share: 16, color: "var(--chart-3)" },
]
function SplitBar() {
return (
<div>
<div className="flex h-3 gap-1">
{SOURCES.map((s) => (
<span key={s.label} className="rounded-full" style={{ width: `${s.share}%`, background: s.color }} />
))}
</div>
<ul className="mt-4 space-y-2 text-[13px]">
{SOURCES.map((s) => (
<li key={s.label} className="flex items-center gap-2">
<i className="size-2.5 rounded-full" style={{ background: s.color }} />
<span className="flex-1">{s.label}</span>
<span className="dc-num text-muted-foreground">{s.share}%</span>
</li>
))}
</ul>
</div>
)
}
const WEEK = [
{ d: "Mon", v: 62 },
{ d: "Tue", v: 100 },
{ d: "Wed", v: 74 },
{ d: "Thu", v: 58 },
{ d: "Fri", v: 41 },
{ d: "Sat", v: 12 },
{ d: "Sun", v: 9 },
]
function WeekBars() {
return (
<div>
<div className="flex h-[88px] items-end gap-2">
{WEEK.map((w) => (
<span
key={w.d}
className={cn("flex-1 rounded-[4px]", w.d === "Tue" ? "bg-[color:var(--chart-1)]" : "bg-[color:color-mix(in_oklab,var(--chart-1)_30%,transparent)]")}
style={{ height: `${w.v}%` }}
/>
))}
</div>
<div className="mt-2 flex gap-2 text-center text-[11px] text-muted-foreground">
{WEEK.map((w) => (
<span key={w.d} className={cn("flex-1", w.d === "Tue" && "font-semibold text-foreground")}>
{w.d.slice(0, 1)}
</span>
))}
</div>
</div>
)
}
export default function BentoGridMetrics() {
return (
<section aria-labelledby="bento-grid-metrics-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="grid gap-5 lg:grid-cols-[minmax(0,1.3fr)_minmax(0,1fr)] lg:items-end lg:gap-16">
<div>
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Orbit in numbers</p>
<h2 id="bento-grid-metrics-title" className="dc-h mt-3 max-w-[620px] text-[32px] leading-[1.1] sm:text-[42px]">
What a year of Orbit looks like for a small studio
</h2>
</div>
<div className="lg:pb-1">
<p className="text-[17px] leading-relaxed text-muted-foreground">
The median studio on Orbit, a year after its first invoice. Your own numbers are on your dashboard from day one.
</p>
<a
href="#customer-stories"
className="mt-4 inline-flex items-center gap-1.5 rounded-[var(--radius)] text-[15px] font-semibold outline-none hover:underline hover:underline-offset-4 focus-visible:ring-3 focus-visible:ring-ring/50"
>
Read the customer stories <ArrowRight className="size-4" aria-hidden="true" />
</a>
</div>
</div>
<div className="mt-12 grid gap-4 md:grid-cols-2 lg:grid-cols-3">
<Cell
className="md:col-span-2"
label="Collected this year"
value="$184,320"
note={
<>
Up 18% on last year, with <span className="font-semibold text-foreground">$23,000</span> expected in December.
</>
}
>
<MonthBars />
</Cell>
<Cell tone="highlight" label="Paid on time" value="92%" note="of invoices are paid by the due date, up from 64% before reminders.">
<Ring value={92} />
</Cell>
<Cell label="Days to get paid" value="11 days" note="on average, down from 26 in January.">
<Sparkline />
</Cell>
<Cell label="From retainers" value="46%" note="of the money now comes from recurring invoices.">
<SplitBar />
</Cell>
<Cell label="Reminders sent" value="1,240" note="Most clients pay on a Tuesday, a day after the nudge.">
<WeekBars />
</Cell>
</div>
</div>
</section>
)
}Showcase cell
One large cell with a rich picture of the product that runs off its edges, beside four smaller cells with a small picture each.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/bento-grid-showcase.json// Bento grid, showcase: one large cell with a rich picture of the product, which runs off the cell's
// right and bottom edges on purpose, beside four smaller cells, each a small picture over a title and a
// line. Desktop: the large cell takes two columns and two rows, the small ones sit two by two. Tablets:
// the large cell runs across the top. Phones: one column. The pictures are drawn in markup so they wear
// the theme; they are hidden from screen readers and each cell's copy says what its picture shows.
import { ArrowRight, Check, Landmark, Plus, Receipt } from "lucide-react"
import type { ReactNode } from "react"
import { cn } from "@/lib/utils"
const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov"]
const THIS_YEAR = [18, 22, 19, 26, 24, 30, 28, 33, 31, 38, 42]
const LAST_YEAR = [15, 16, 18, 17, 20, 21, 22, 21, 25, 24, 27]
const RECENT = [
{ client: "Fernwood Studio", status: "Due", amount: "$4,200.00" },
{ client: "Kato & Lee", status: "Overdue", amount: "$1,860.00" },
{ client: "Northlight", status: "Paid", amount: "$7,450.00" },
{ client: "Juniper Labs", status: "Paid", amount: "$2,300.00" },
{ client: "Ola Bakery", status: "Paid", amount: "$640.00" },
] as const
const PILL = { Paid: "dc-pill-hl", Due: "dc-pill-line", Overdue: "dc-pill-danger" } as const
function Dashboard() {
return (
<div className="dc-card w-[700px] p-5 text-[13px]">
<div className="flex items-center justify-between gap-3">
<div>
<p className="dc-h text-[18px]">November</p>
<p className="text-muted-foreground">12 invoices out, 5 waiting</p>
</div>
<div className="flex items-center gap-2">
<span className="flex rounded-[var(--radius)] bg-muted p-[3px]">
{["Month", "Quarter", "Year"].map((t, i) => (
<span key={t} className={cn("rounded-[calc(var(--radius)-2px)] px-2.5 py-1", i === 0 ? "bg-card font-semibold shadow-sm" : "text-muted-foreground")}>
{t}
</span>
))}
</span>
<span className="inline-flex h-8 items-center gap-1.5 rounded-[var(--radius)] bg-primary px-3 font-semibold text-primary-foreground">
<Plus className="size-3.5" /> New invoice
</span>
</div>
</div>
<div className="mt-4 grid grid-cols-3 gap-2.5">
{[
{ label: "Collected", value: "$18,450", note: "+$2,300 on October" },
{ label: "Outstanding", value: "$9,860", note: "5 invoices" },
{ label: "Overdue", value: "$1,860", note: "Kato & Lee, 7 days" },
].map((s, i) => (
<div
key={s.label}
className={cn(
"rounded-[calc(var(--radius)+2px)] border border-border p-3",
i === 0 && "border-transparent bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)]",
)}
>
<p className={cn("text-xs", i === 0 ? "opacity-80" : "text-muted-foreground")}>{s.label}</p>
<p className="dc-num mt-1 text-[22px] font-semibold tracking-tight">{s.value}</p>
<p className={cn("mt-0.5 text-[11px]", i === 0 ? "opacity-80" : "text-muted-foreground")}>{s.note}</p>
</div>
))}
</div>
<div className="mt-3 grid grid-cols-[1.1fr_1fr] gap-2.5">
<div className="rounded-[calc(var(--radius)+2px)] border border-border p-3">
<div className="flex items-center justify-between">
<p className="font-semibold">Cash in</p>
<p className="flex items-center gap-3 text-[11px] text-muted-foreground">
<span className="inline-flex items-center gap-1">
<i className="size-2 rounded-full bg-[color:var(--chart-1)]" /> 2026
</span>
<span className="inline-flex items-center gap-1">
<i className="size-2 rounded-full bg-[color:var(--chart-2)]" /> 2025
</span>
</p>
</div>
<div className="mt-3 flex items-end gap-[3%]">
{THIS_YEAR.map((v, i) => (
<div key={MONTHS[i]} className="flex h-[120px] flex-1 items-end justify-center gap-[12%]">
<span className="w-[38%] rounded-t-[3px] bg-[color:var(--chart-2)]" style={{ height: `${(LAST_YEAR[i] / 45) * 100}%` }} />
<span className="w-[38%] rounded-t-[3px] bg-[color:var(--chart-1)]" style={{ height: `${(v / 45) * 100}%` }} />
</div>
))}
</div>
</div>
<div className="rounded-[calc(var(--radius)+2px)] border border-border">
<p className="px-3 pt-3 font-semibold">Recent invoices</p>
<ul className="mt-2">
{RECENT.map((r) => (
<li key={r.client} className="flex items-center gap-2 border-t border-border px-3 py-2">
<span className="min-w-0 flex-1 truncate">{r.client}</span>
<span className={cn("dc-pill", PILL[r.status])}>{r.status}</span>
<span className="dc-num w-[68px] text-right">{r.amount}</span>
</li>
))}
</ul>
</div>
</div>
</div>
)
}
function Small({ title, body, children }: { title: string; body: string; children: ReactNode }) {
return (
<div className="dc-card flex flex-col p-6">
<div aria-hidden="true" className="flex items-center text-[13px] sm:h-[112px]">
{children}
</div>
<h3 className="dc-h mt-5 text-[19px] leading-snug">{title}</h3>
<p className="mt-1.5 text-[15px] leading-relaxed text-muted-foreground">{body}</p>
</div>
)
}
const box = "w-full rounded-[calc(var(--radius)+4px)] border border-border bg-background"
export default function BentoGridShowcase() {
return (
<section aria-labelledby="bento-grid-showcase-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="mx-auto max-w-[640px] text-center">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Orbit at a glance</p>
<h2 id="bento-grid-showcase-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
The money side of your studio, on one screen
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-balance text-muted-foreground">
Open Orbit on a Monday and know what came in, what is due and who needs a nudge.
</p>
</div>
<div className="mt-14 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
<div className="dc-card flex flex-col overflow-hidden bg-[color:color-mix(in_oklab,var(--dc-accent)_8%,var(--card))] md:col-span-2 lg:row-span-2">
<div className="p-6 sm:p-8">
<h3 className="dc-h text-[24px] leading-snug sm:text-[28px]">Your month, before it happens</h3>
<p className="mt-2 max-w-[440px] text-[15px] leading-relaxed text-muted-foreground sm:text-[16px]">
What you collected, what is still out and who is late, next to the same month last year.
</p>
<a
href="#dashboard"
className="mt-4 inline-flex items-center gap-1.5 rounded-[var(--radius)] text-[15px] font-semibold outline-none hover:underline hover:underline-offset-4 focus-visible:ring-3 focus-visible:ring-ring/50"
>
Take the tour <ArrowRight className="size-4" aria-hidden="true" />
</a>
</div>
<div aria-hidden="true" className="relative min-h-[300px] flex-1 sm:min-h-[330px]">
<div className="absolute top-0 left-6 sm:left-8">
<Dashboard />
</div>
</div>
</div>
<Small title="Reminders in your tone" body="Friendly, neutral or firm, written for you and sent on a plan.">
<div className={cn(box, "p-3")}>
<div className="grid grid-cols-3 rounded-[var(--radius)] bg-muted p-[3px] text-center">
{["Friendly", "Neutral", "Firm"].map((t, i) => (
<span key={t} className={cn("rounded-[calc(var(--radius)-2px)] py-0.5", i === 0 ? "bg-card font-semibold shadow-sm" : "text-muted-foreground")}>
{t}
</span>
))}
</div>
<p className="mt-2.5 truncate text-muted-foreground">“Hi Tom, a quick nudge…”</p>
</div>
</Small>
<Small title="Paid out in two days" body="Card and bank payments land in your account two working days later.">
<div className={cn(box, "p-3")}>
<div className="flex items-center gap-2">
<Landmark className="size-4 text-muted-foreground" />
<span className="flex-1 font-semibold">Payout</span>
<span className="dc-num font-semibold">$7,450.00</span>
</div>
<ol className="mt-3 grid grid-cols-3 gap-1.5">
{["Paid", "On its way", "Arrived"].map((s, i) => (
<li key={s}>
<span className={cn("block h-1.5 rounded-full", i < 2 ? "bg-[color:var(--dc-accent)]" : "bg-muted")} />
<span className={cn("mt-1.5 block text-[11px]", i < 2 ? "font-semibold" : "text-muted-foreground")}>{s}</span>
</li>
))}
</ol>
</div>
</Small>
<Small title="Retainers on autopilot" body="Recurring invoices go out every month and stop when the contract ends.">
<ol className={cn(box, "grid grid-cols-6 gap-1 p-3 text-center")}>
{["Jul", "Aug", "Sep", "Oct", "Nov", "Dec"].map((m, i) => (
<li key={m}>
<span
className={cn(
"mx-auto grid size-6 place-items-center rounded-full",
i < 5 ? "bg-[color:var(--dc-accent)] text-[color:var(--background)]" : "border-2 border-dashed border-[color:var(--dc-accent)]",
)}
>
{i < 5 ? <Check className="size-3" strokeWidth={3} /> : null}
</span>
<span className="mt-1 block text-[11px] text-muted-foreground">{m}</span>
</li>
))}
</ol>
</Small>
<Small title="Receipts, sent for you" body="The client gets a receipt the moment they pay, and so does your bookkeeper.">
<div className={cn(box, "flex items-center gap-3 p-3")}>
<span className="dc-icon size-9 shrink-0">
<Receipt className="size-4" />
</span>
<span className="min-w-0 flex-1">
<span className="block truncate font-semibold">Receipt sent</span>
<span className="block truncate text-muted-foreground">To Ola Bakery</span>
</span>
<span className="grid size-6 shrink-0 place-items-center rounded-full bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)]">
<Check className="size-3.5" strokeWidth={3} />
</span>
</div>
</Small>
</div>
</div>
</section>
)
}Three-up
One wide and two narrow cells in a row, each an inset panel with a picture of the product above a short title and a line.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/bento-grid-three-up.json// Bento grid, three-up: three cells in one row, one wide and two narrow. Each cell holds an inset panel
// with a small picture of the product (the narrow ones run off the panel's lower edge on purpose) above
// a short title and a line. The cells share one height on desktop. Tablets: the wide cell on top, the narrow
// ones side by side. Phones: one column. The pictures are drawn in markup so they wear the theme; they
// are hidden from screen readers and each cell's copy says what its picture shows.
import { CalendarCheck, Check, CreditCard, Landmark } from "lucide-react"
import type { ReactNode } from "react"
import { cn } from "@/lib/utils"
function Cell({ className, title, body, children }: { className?: string; title: string; body: string; children: ReactNode }) {
return (
<div className={cn("dc-card flex flex-col p-2", className)}>
<div
aria-hidden="true"
className="relative h-[300px] overflow-hidden rounded-[max(0px,calc(var(--dc-radius-card)-6px))] bg-[color:color-mix(in_oklab,var(--dc-accent)_8%,var(--card))] text-[13px]"
>
{children}
</div>
<div className="px-4 pt-5 pb-4 sm:px-5">
<h3 className="dc-h text-[20px] leading-snug">{title}</h3>
<p className="mt-1.5 text-[15px] leading-relaxed text-muted-foreground">{body}</p>
</div>
</div>
)
}
const STEPS = [
{ label: "Sent", when: "Nov 14" },
{ label: "Opened", when: "Nov 14" },
{ label: "Nudged", when: "Nov 25" },
{ label: "Paid", when: "Nov 27" },
]
function Journey() {
return (
<div className="px-5 pt-7 sm:px-8">
<div className="dc-card p-5">
<div className="flex items-start justify-between gap-3">
<div className="min-w-0">
<p className="truncate text-muted-foreground">INV-1042 · Fernwood Studio</p>
<p className="dc-num mt-0.5 text-[22px] font-semibold tracking-tight">$4,200.00</p>
</div>
<span className="dc-pill dc-pill-hl">Paid</span>
</div>
<ol className="relative mt-6 grid grid-cols-4 before:absolute before:top-[11px] before:right-[12.5%] before:left-[12.5%] before:h-0.5 before:bg-[color:var(--dc-accent)]">
{STEPS.map((s, i) => (
<li key={s.label} className="relative flex flex-col items-center text-center">
<span
className={cn(
"grid size-6 place-items-center rounded-full",
i === 3 ? "bg-[color:var(--dc-highlight)] text-[color:var(--dc-highlight-fg)] ring-4 ring-[color:var(--card)]" : "bg-[color:var(--dc-accent)] text-[color:var(--background)]",
)}
>
<Check className="size-3.5" strokeWidth={3} />
</span>
<span className="mt-2 text-[12px] font-semibold sm:text-[13px]">{s.label}</span>
<span className="dc-num text-[11px] text-muted-foreground sm:text-[12px]">{s.when}</span>
</li>
))}
</ol>
</div>
<div className="dc-card relative z-10 -mt-3 mr-4 ml-auto flex w-[250px] max-w-[calc(100%-1rem)] items-center gap-3 p-3">
<span className="dc-icon size-8 shrink-0">
<CalendarCheck className="size-4" />
</span>
<div className="min-w-0">
<p className="font-semibold">Paid in 13 days</p>
<p className="text-muted-foreground">Two days before it was due</p>
</div>
</div>
</div>
)
}
function PaySheet() {
return (
<div className="dc-card absolute top-7 right-5 left-5 p-4 sm:right-6 sm:left-6">
<p className="text-muted-foreground">Pay Ada for INV-1044</p>
<p className="dc-num mt-0.5 text-[22px] font-semibold tracking-tight">$640.00</p>
<div className="mt-4 space-y-2">
<span className="flex h-10 items-center gap-2.5 rounded-[var(--radius)] border-2 border-[color:var(--dc-accent)] px-3 font-semibold">
<CreditCard className="size-4 text-[color:var(--dc-accent)]" /> Card
<span className="ml-auto grid size-4 place-items-center rounded-full bg-[color:var(--dc-accent)]">
<span className="size-1.5 rounded-full bg-[color:var(--card)]" />
</span>
</span>
<span className="flex h-10 items-center gap-2.5 rounded-[var(--radius)] border border-input px-3 text-muted-foreground">
<Landmark className="size-4" /> Bank transfer
<span className="ml-auto size-4 rounded-full border-2 border-input" />
</span>
</div>
<span className="mt-4 flex h-9 items-center justify-center rounded-[var(--radius)] bg-primary font-semibold text-primary-foreground">Pay $640.00</span>
</div>
)
}
const LATE = [
{ client: "Kato & Lee", days: 7 },
{ client: "Halcyon", days: 3 },
{ client: "Brightedge", days: 1 },
]
function LateList() {
return (
<div className="dc-card absolute top-7 right-5 left-5 overflow-hidden sm:right-6 sm:left-6">
<p className="flex items-center justify-between px-4 pt-4 pb-3">
<span className="font-semibold">Late this week</span>
<span className="dc-num text-muted-foreground">$4,990</span>
</p>
<ul>
{LATE.map((r) => (
<li key={r.client} className="flex items-center gap-3 border-t border-border px-4 py-2.5">
<span className="min-w-0 flex-1 truncate font-semibold">{r.client}</span>
<span className="dc-pill dc-pill-danger">
{r.days} {r.days === 1 ? "day" : "days"} late
</span>
</li>
))}
</ul>
<div className="border-t border-border p-3">
<span className="flex h-9 items-center justify-center rounded-[var(--radius)] bg-primary font-semibold text-primary-foreground">Nudge all three</span>
</div>
</div>
)
}
export default function BentoGridThreeUp() {
return (
<section aria-labelledby="bento-grid-three-up-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="max-w-[640px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Every week</p>
<h2 id="bento-grid-three-up-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Three screens you will open every Monday
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-muted-foreground">
Where each invoice stands, how clients pay you and who needs a nudge, without opening a spreadsheet.
</p>
</div>
<div className="mt-12 grid gap-4 md:grid-cols-2 lg:grid-cols-4">
<Cell className="md:col-span-2" title="Every invoice, start to paid" body="See when it was sent, opened and chased, and the moment the money lands.">
<Journey />
</Cell>
<Cell title="Clients pay their way" body="Card or bank transfer from one link, with no account to make.">
<PaySheet />
</Cell>
<Cell title="Know who is late" body="Late invoices rise to the top, with a nudge one click away.">
<LateList />
</Cell>
</div>
</div>
</section>
)
}