About
A shared bill splitter with per-line assignments, animated per-person shares, tip and tax controls, payer selection, settlement instructions, keyboard-friendly toggles and a reversible settled state.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Expense Splitter to your project and fits it to your theme.
Code
How Expense Splitter is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
/**
* PrequelUI Animate — MIT — https://prequeluianimate.terravidhal.me
*/
import { ExpenseSplitter, type SplitItem, type SplitPerson } from "@/components/ui/expense-splitter";
const PEOPLE: SplitPerson[] = [
{ id: "mara", name: "Mara Ellison", tone: "sky" },
{ id: "theo", name: "Theo Nakamura", tone: "violet" },
{ id: "priya", name: "Priya Raman", tone: "amber" },
{ id: "jonas", name: "Jonas Weber", tone: "emerald" },
];
const ITEMS: SplitItem[] = [
{
id: "table",
label: "Shared starters and small plates",
amount: 68,
assignedTo: ["mara", "theo", "priya", "jonas"],
},
{
id: "mains",
label: "Four main courses",
amount: 124,
assignedTo: ["mara", "theo", "priya", "jonas"],
},
{
id: "wine",
label: "Two bottles of house red",
amount: 56,
assignedTo: ["mara", "theo"],
},
{
id: "dessert",
label: "Dessert tasting board",
amount: 32,
assignedTo: ["priya", "jonas"],
},
{
id: "coffee",
label: "Coffee and tea",
amount: 18,
assignedTo: ["mara", "priya", "jonas"],
},
{
id: "service",
label: "Private room fee",
amount: 40,
assignedTo: ["mara", "theo", "priya", "jonas"],
},
];
export default function ExpenseSplitterDemo() {
return (
<main className="flex min-h-screen w-full items-center justify-center bg-background px-4 py-12 sm:px-6">
<ExpenseSplitter
people={PEOPLE}
items={ITEMS}
taxRate={8.25}
title="Dinner for four"
description="A shared dinner with a few uneven orders. Assign each line, add a tip and settle without a spreadsheet."
/>
</main>
);
}








