Payments and payouts bento
A payout tile with its fee breakdown and a payment methods tile, both with color image placeholders, above a ledger of recent settlements.
pnpm dlx shadcn@latest add @haze/bento-fintech---
import { Check, Clock3, CreditCard, Landmark } from "@lucide/astro";
import { cn } from "../../../lib/haze/utils";
import BentoTile from "../ui/bento-tile.astro";
import Collapsible from "../ui/collapsible.astro";
import SectionHeading from "../ui/section-heading.astro";
interface Props {
id?: string;
title?: string;
description?: string;
headingLevel?: 1 | 2 | 3;
payout?: { amount: string; date: string; status: string; lines: { label: string; amount: string }[] };
methods?: { name: string; detail: string; kind: "bank" | "card" }[];
settlements?: { label: string; amount: string; date: string; status: string; settled?: boolean }[];
class?: string;
}
const {
id = "bento-fintech", title = "See when money moves", headingLevel = 2,
description = "Trace a sample payout from the collected payments to the fees, accounts and settlement dates.",
payout = {
amount: "$12,480.00", date: "Expected Friday, Nov 20", status: "Scheduled",
lines: [{ label: "Payments collected", amount: "$12,768.30" }, { label: "Processing fees", amount: "−$288.30" }],
},
methods = [
{ name: "Operating account", detail: "Bank account ending in 3842", kind: "bank" },
{ name: "Business card", detail: "Card ending in 1705", kind: "card" },
],
settlements = [
{ label: "Card sales", amount: "$4,280.00", date: "Nov 18", status: "Processing" },
{ label: "October adjustment", amount: "$320.50", date: "Nov 16", status: "Settled", settled: true },
{ label: "Bank transfers", amount: "$6,745.00", date: "Nov 13", status: "Settled", settled: true },
],
class: className,
} = Astro.props;
const tileHeading = ({ 1: 2, 2: 3, 3: 4 } as const)[headingLevel];
---
<section aria-labelledby={`${id}-title`} class={cn("bg-background px-5 py-12 sm:px-8 sm:py-18", className)}>
<div class="mx-auto grid max-w-6xl gap-7 sm:gap-10">
<SectionHeading id={`${id}-title`} title={title} description={description} headingLevel={headingLevel} />
<div data-bento-grid class="grid min-w-0 gap-3 md:grid-cols-[minmax(0,1.35fr)_minmax(0,1fr)] md:gap-4">
<BentoTile title="Next payout" description={`${payout.amount} · ${payout.date} · ${payout.status}`} headingLevel={tileHeading} class={cn(!methods.length && "md:col-span-2")}
visualClass="flex-1">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
{payout.lines.length > 0 && (
<Collapsible title="Payout breakdown" class="rounded-lg bg-background/65">
<dl class="grid gap-2">
{payout.lines.map(({ label, amount }) => (
<div class="flex min-w-0 flex-wrap justify-between gap-x-3">
<dt class="wrap-anywhere">{label}</dt><dd class="font-mono wrap-anywhere text-foreground">{amount}</dd>
</div>
))}
</dl>
</Collapsible>
)}
</BentoTile>
{methods.length > 0 && (
<BentoTile title="Payment methods" headingLevel={tileHeading} visualClass="flex-1 bg-foreground/6">
<div slot="visual" aria-hidden="true" class="min-h-44 sm:min-h-56"></div>
{methods.length > 0 && (
<ul class="grid min-w-0 gap-2">
{methods.map(({ name, detail, kind }) => {
const Icon = kind === "bank" ? Landmark : CreditCard;
return (
<li class="flex min-w-0 items-center gap-2.5">
<span aria-hidden="true" class="grid size-9 shrink-0 place-items-center rounded-lg bg-foreground/5 text-muted-foreground"><Icon class="size-4" /></span>
<p class="min-w-0 text-sm/5 font-medium wrap-anywhere">{name}<span class="block text-xs/5 font-normal text-muted-foreground">{detail}</span></p>
</li>
);
})}
</ul>
)}
</BentoTile>
)}
{settlements.length > 0 && (
<BentoTile title="Recent settlements" headingLevel={tileHeading} class="md:col-span-2">
<ul class="grid min-w-0 grid-cols-[repeat(auto-fit,minmax(min(100%,13rem),1fr))] gap-x-6 gap-y-4">
{settlements.map(({ label, amount, date, status, settled }) => {
const Icon = settled ? Check : Clock3;
return (
<li class="grid min-w-0 content-start gap-1.5">
<div class="flex min-w-0 items-center gap-2">
<span aria-hidden="true" class={cn("grid size-6 shrink-0 place-items-center rounded-full", settled ? "bg-success/14 text-success" : "bg-muted text-muted-foreground")}><Icon class="size-3.5" /></span>
<span class="min-w-0 font-mono text-xs/5 wrap-anywhere text-muted-foreground">{date}</span>
<span aria-hidden="true" class="min-w-3 grow border-t border-border"></span>
</div>
<div class="min-w-0">
<p class="text-xl/7 font-semibold tracking-tight wrap-anywhere tabular-nums">{amount}</p>
<p class="mt-0.5 text-sm/5 wrap-anywhere">{label}<span class="text-muted-foreground"> · {status}</span></p>
</div>
</li>
);
})}
</ul>
</BentoTile>
)}
</div>
</div>
</section>When to use
- A product page shows what clears into a scheduled payout.
- Readers compare a payout with its funding methods and settlement dates.
When not to use
- The page needs to initiate transactions or collect payment information.
Installation
Add the Haze registry to components.json once, then install Payments and payouts bento with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.
pnpm dlx shadcn@latest add @haze/bento-fintechnpx shadcn@latest add @haze/bento-fintechyarn dlx shadcn@latest add @haze/bento-fintechbunx --bun shadcn@latest add @haze/bento-fintechFirst time? Registry and theme setup
1. Add to components.json:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | bento-fintech | Unique prefix for the section heading. |
| title | string | – | Visible section heading. |
| description | string | – | Context for the payout and settlements. |
| headingLevel | 1 | 2 | 3 | 2 | Heading level for the section. |
| payout | Payout | – | Amount, date and status, shown under the tile title. Supplying line items adds the fee breakdown. |
| methods | Method[] | – | Names and masked details of the funding accounts. |
| settlements | Settlement[] | – | Ordered ledger entries with amounts, dates, status text and an optional settled state. |
| class | string | – | Classes on the section wrapper. |
Keyboard interactions
- EnterSpace
- Expand or collapse the payout breakdown.
Accessibility
- Each color field stands in for a product image and is aria-hidden.
- Payout line items pair their labels and amounts. Every ledger entry states its settlement status.
Notes for AI
Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.
Install and use
Install the Haze UI block "Payments and payouts bento" with `npx shadcn@latest add @haze/bento-fintech`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import BentoFintech from "@/components/haze/blocks/bento-fintech.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/blocks/bento-fintech.md
Customize with real content
Adapt the Haze bento-fintech block for our product. Replace the demo values of these props with our real content: id, title, description, headingLevel, payout, methods, settlements, class. Keep the layout, the heading level rules and these accessibility details: Each color field stands in for a product image and is aria-hidden. Payout line items pair their labels and amounts. Every ledger entry states its settlement status. Do not add raw color classes; use the Haze tokens.
Choose the right block
Before using bento-fintech, check it fits: use it when a product page shows what clears into a scheduled payout.; readers compare a payout with its funding methods and settlement dates.. Avoid it when the page needs to initiate transactions or collect payment information.. Alternatives: @haze/usage-meter, @haze/table, @haze/pricing-single-plan.
Dependencies
- npm: @lucide/astro
- @haze/bento-tile
- @haze/collapsible
- @haze/section-heading
- @haze/utils
- @haze/theme (one-time setup)
Source · Original Haze UI work.