Component packs › Tender › Split Bill

Split Bill

Change the head count and coins pour from the bill to each person in turn while their share counts up, always adding up to the cent.

Split Bill is a split from Tender, a component pack with 6 payment components: Payment components where you watch the money move. Price: $2 for the whole pack.

Built with: pour to each person, cent-exact shares, count-up on landing.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Split Bill props

PropTypeDefaultDescription
totalnumber
currencystring
titlestring
peoplestring[]
countnumber
onChange(shares: { name: string; amount: number }[]) => void
autoplaynumber | falseShowcase mode: changes the head count every N ms while visible.

Methods on the ref

Use it in React

import SplitBill from './SplitBill';

<SplitBill />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Tender

Good for: Pricing and payment.