Freelancer money app page with a live split
A friendly fintech page: press Get paid and coins fly from the invoice into tax, savings and spending jars that fill with a wavy liquid.
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./money-page.css";
/**
* MoneyPage: a friendly page for a money app for freelancers ("Jarful").
* Its signature is the live split: press "Get paid" and coins fly from the
* invoice into three jars (tax, savings, spending) that fill with a wavy
* liquid. Three linked sliders always add up to 100%.
* It is a demo: nothing is sent anywhere.
*/
const JARS = [
{
id: "tax",
name: "Tax",
color: "#ff5a1f",
hint: "Ready when the bill comes",
},
{
id: "save",
name: "Savings",
color: "#2b35ff",
hint: "For slow months and holidays",
},
{
id: "spend",
name: "Spending",
color: "#1f8a5b",
hint: "Yours to use, guilt-free",
},
];
const PRESETS = [450, 1200, 3800];
const PEOPLE = [
{
img: "/images/landing-money-courier-22.jpg",
alt: "Illustration of a courier in an orange jacket on a cargo bike in the rain under a floating umbrella",
tone: "#2b35ff",
who: "Couriers",
line: "Paid weekly, in bits. Jarful catches every one.",
},
{
img: "/images/landing-money-translator-23.jpg",
alt: "Illustration of an older translator at a kitchen table at night with dictionaries, a cat and a glowing lamp",
tone: "#7a3b5c",
who: "Translators",
line: "One big invoice a month, split before you see it.",
},
{
img: "/images/landing-money-tattoo-24.jpg",
alt: "Illustration of a tattoo artist raising both arms in celebration next to a puffy green plant",
tone: "#ff5a1f",
who: "Tattoo artists",
line: "Cash, card and deposits, all in the right jar.",
},
];
const FAQ = [
[
"Is my money safe?",
"Your jars are real accounts at a licensed partner bank, protected up to €100,000.",
],
[
"Can I change the split?",
"Any time, for each payment or for all of them. Moving money between jars is instant and free.",
],
[
"Does it file my taxes?",
"No, but at the end of the year you get one tidy export your accountant will love.",
],
];
const eur = new Intl.NumberFormat("en-IE", {
style: "currency",
currency: "EUR",
maximumFractionDigits: 0,
});
/** Move one share and spread the difference over the others, keeping a total of 100. */
function rebalance(split: number[], i: number, v: number) {
const rest = split.reduce((a, b, k) => (k === i ? a : a + b), 0);
const left = 100 - v;
const next = split.map((s, k) =>
k === i ? v : rest ? Math.round((s / rest) * left) : Math.round(left / 2),
);
const drift = 100 - next.reduce((a, b) => a + b, 0);
const fix = next.findIndex((_, k) => k !== i);
next[fix] += drift;
return next;
}
/* ------------------------------------------------------------------ */
function Art({
src,
alt,
tone,
className = "",
}: {
src: string;
alt: string;
tone: string;
className?: string;
}) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div
className={`gu-jar__art ${className}`}
style={{ "--tone": tone } as CSSProperties}
>
{!missing && (
<img
ref={img}
src={src}
alt={alt}
loading="lazy"
onError={() => setMissing(true)}
/>
)}
</div>
);
}
/** Counts smoothly to a new value whenever it changes. */
function Money({ value }: { value: number }) {
const [shown, setShown] = useState(value);
const from = useRef(value);
useEffect(() => {
const start = from.current;
const dur = window.matchMedia("(prefers-reduced-motion: reduce)").matches
? 1
: 900;
let raf = 0;
let t0 = 0;
const tick = (now: number) => {
if (!t0) t0 = now;
const p = Math.min(1, (now - t0) / dur);
const v = start + (value - start) * (1 - Math.pow(1 - p, 3));
from.current = v;
setShown(v);
if (p < 1) raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => cancelAnimationFrame(raf);
}, [value]);
return <>{eur.format(Math.round(shown))}</>;
}
function Jar({
name,
color,
level,
jarRef,
}: {
name: string;
color: string;
level: number;
jarRef: (el: HTMLDivElement | null) => void;
}) {
const id = `gu-jar-clip-${name}`;
return (
<div
className="gu-jar__jar"
ref={jarRef}
style={{ "--c": color, "--level": level } as CSSProperties}
>
<svg viewBox="0 0 140 180" aria-hidden="true">
<defs>
<clipPath id={id}>
<path d="M30 34 h80 v10 q14 8 14 26 v86 q0 18 -18 18 h-72 q-18 0 -18 -18 v-86 q0 -18 14 -26 z" />
</clipPath>
</defs>
<g clipPath={`url(#${id})`}>
<rect
x="0"
y="0"
width="140"
height="180"
className="gu-jar__glass-bg"
/>
<g className="gu-jar__liquid">
<path
className="gu-jar__wave gu-jar__wave--back"
d="M0 10 q17.5 -10 35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 v200 h-280 z"
/>
<path
className="gu-jar__wave"
d="M0 10 q17.5 -10 35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 v200 h-280 z"
/>
</g>
</g>
<path
d="M30 34 h80 v10 q14 8 14 26 v86 q0 18 -18 18 h-72 q-18 0 -18 -18 v-86 q0 -18 14 -26 z"
className="gu-jar__glass"
/>
<rect
x="26"
y="18"
width="88"
height="18"
rx="6"
className="gu-jar__lid"
/>
<path d="M34 70 q-6 30 0 70" className="gu-jar__shine" />
</svg>
</div>
);
}
/* ------------------------------------------------------------------ */
function Splitter() {
const [amount, setAmount] = useState(1200);
const [split, setSplit] = useState([30, 20, 50]);
const [balances, setBalances] = useState([620, 410, 380]);
const [paid, setPaid] = useState(0);
const stage = useRef<HTMLDivElement>(null);
const invoice = useRef<HTMLDivElement>(null);
const jars = useRef<(HTMLDivElement | null)[]>([]);
const shares = split.map((p) => Math.round((amount * p) / 100));
const top = Math.max(...balances, 1);
const getPaid = () => {
const add = shares;
const st = stage.current;
const inv = invoice.current;
const reduce = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
if (st && inv && !reduce) {
const s = st.getBoundingClientRect();
const a = inv.getBoundingClientRect();
const ax = a.left + a.width / 2 - s.left;
const ay = a.top + a.height / 2 - s.top;
split.forEach((p, j) => {
const jar = jars.current[j];
if (!jar) return;
const b = jar.getBoundingClientRect();
const bx = b.left + b.width / 2 - s.left;
const by = b.top + b.height * 0.25 - s.top;
const n = Math.max(1, Math.round(p / 10));
for (let k = 0; k < n; k++) {
const coin = document.createElement("span");
coin.className = "gu-jar__coin";
coin.style.background = JARS[j].color;
st.appendChild(coin);
const mx = (ax + bx) / 2 + (k - n / 2) * 8;
const my = Math.min(ay, by) - 90 - k * 6;
coin
.animate(
[
{
transform: `translate(${ax}px, ${ay}px) scale(0.4)`,
opacity: 0,
},
{
transform: `translate(${ax}px, ${ay}px) scale(1)`,
opacity: 1,
offset: 0.12,
},
{
transform: `translate(${mx}px, ${my}px) scale(1.1) rotate(180deg)`,
offset: 0.55,
},
{
transform: `translate(${bx}px, ${by}px) scale(0.7) rotate(360deg)`,
opacity: 1,
offset: 0.95,
},
{
transform: `translate(${bx}px, ${by + 20}px) scale(0.4)`,
opacity: 0,
},
],
{
duration: 1000,
delay: j * 120 + k * 70,
easing: "cubic-bezier(0.45, 0, 0.25, 1)",
fill: "both",
},
)
.finished.then(() => coin.remove())
.catch(() => coin.remove());
}
});
}
window.setTimeout(
() => {
setBalances((b) => b.map((v, i) => v + add[i]));
setPaid((n) => n + 1);
},
reduce ? 0 : 900,
);
};
return (
<section
className="gu-jar__split"
id="jar-try"
aria-labelledby="jar-s-title"
>
<div className="gu-jar__split-head">
<h2 id="jar-s-title" className="gu-jar__h2">
Watch a payment split itself.
</h2>
<p className="gu-jar__muted">
Pick an invoice, set your rules, press the button.
</p>
</div>
<div className="gu-jar__board" ref={stage}>
<div className="gu-jar__controls">
<div className="gu-jar__invoice" ref={invoice}>
<p className="gu-jar__muted">Invoice paid</p>
<label className="gu-jar__amount">
<span className="sr-only">Amount in euros</span>
<span aria-hidden="true">€</span>
<input
type="number"
min={1}
max={100000}
value={amount}
onChange={(e) =>
setAmount(
Math.max(0, Math.min(100000, Number(e.target.value) || 0)),
)
}
/>
</label>
<div className="gu-jar__presets">
{PRESETS.map((p) => (
<button
key={p}
type="button"
aria-pressed={amount === p}
onClick={() => setAmount(p)}
>
{eur.format(p)}
</button>
))}
</div>
</div>
<fieldset className="gu-jar__rules">
<legend>Your split</legend>
{JARS.map((j, i) => (
<label
key={j.id}
style={
{ "--c": j.color, "--p": `${split[i]}%` } as CSSProperties
}
>
<span className="gu-jar__rule-head">
<span>{j.name}</span>
<output>
{split[i]}%{" "}
<span className="gu-jar__muted">
{eur.format(shares[i])}
</span>
</output>
</span>
<input
type="range"
min={0}
max={100}
value={split[i]}
aria-valuetext={`${split[i]}%, ${eur.format(shares[i])}`}
onChange={(e) =>
setSplit(rebalance(split, i, Number(e.target.value)))
}
/>
</label>
))}
</fieldset>
<button
type="button"
className="gu-jar__cta"
onClick={getPaid}
disabled={!amount}
>
Get paid {eur.format(amount)}
</button>
</div>
<div className="gu-jar__jars" aria-live="polite">
{JARS.map((j, i) => (
<div key={j.id} className="gu-jar__slot">
<Jar
name={j.id}
color={j.color}
level={0.12 + (balances[i] / top) * 0.7}
jarRef={(el) => {
jars.current[i] = el;
}}
/>
<p className="gu-jar__jar-name">{j.name}</p>
<p className="gu-jar__jar-sum" data-bump={paid % 2}>
<Money value={balances[i]} />
</p>
<p className="gu-jar__muted gu-jar__jar-hint">{j.hint}</p>
</div>
))}
</div>
</div>
</section>
);
}
/* ------------------------------------------------------------------ */
export function MoneyPage() {
const [open, setOpen] = useState(0);
return (
<div className="gu-jar">
<nav className="gu-jar__nav" aria-label="Main">
<a href="#" className="gu-jar__logo">
<span className="gu-jar__logo-mark" aria-hidden="true" />
jarful
</a>
<a href="#jar-try" className="gu-jar__pill">
Try the split
</a>
</nav>
<header className="gu-jar__hero">
<Art
src="/images/landing-money-hero-21.jpg"
alt="Illustration of a woodworker in a sawdust apron smiling at her phone while three puffy coins float above it"
tone="#1b1713"
className="gu-jar__hero-art"
/>
<div className="gu-jar__hero-copy">
<h1 className="gu-jar__h1">
Get paid.
<br />
It's already sorted.
</h1>
<p className="gu-jar__lede">
Jarful splits every payment the second it lands: tax set aside,
savings topped up, and the rest is yours to spend.
</p>
<div className="gu-jar__hero-actions">
<a href="#jar-try" className="gu-jar__cta">
See it split
</a>
<p className="gu-jar__muted">Free for your first €10,000.</p>
</div>
</div>
</header>
<Splitter />
<section className="gu-jar__people" aria-labelledby="jar-p-title">
<h2 id="jar-p-title" className="gu-jar__h2">
Made for people who invoice.
</h2>
<ul>
{PEOPLE.map((p, i) => (
<li key={p.who} style={{ "--i": i } as CSSProperties}>
<Art src={p.img} alt={p.alt} tone={p.tone} />
<h3>{p.who}</h3>
<p className="gu-jar__muted">{p.line}</p>
</li>
))}
</ul>
</section>
<section className="gu-jar__faq" aria-labelledby="jar-f-title">
<h2 id="jar-f-title" className="gu-jar__h2">
Questions.
</h2>
<div>
{FAQ.map(([q, a], i) => (
<div key={q} className="gu-jar__q" data-open={open === i}>
<h3>
<button
type="button"
aria-expanded={open === i}
aria-controls={`jar-a-${i}`}
onClick={() => setOpen(open === i ? -1 : i)}
>
{q}
<span aria-hidden="true" />
</button>
</h3>
<div
id={`jar-a-${i}`}
className="gu-jar__a"
role="region"
aria-label={q}
inert={open !== i}
>
<div>
<p>{a}</p>
</div>
</div>
</div>
))}
</div>
</section>
<footer className="gu-jar__foot">
<p className="gu-jar__logo">
<span className="gu-jar__logo-mark" aria-hidden="true" />
jarful
</p>
<p className="gu-jar__muted">
Made for freelancers, by former freelancers.
</p>
</footer>
</div>
);
}
Paste this into ChatGPT, Claude, Cursor, v0, Lovable or Bolt. It describes the layout, motion, colors and accessibility and includes the code, so the AI can rebuild it in any framework.
# Build this UI piece: Freelancer money app page with a live split
You are a senior front-end engineer. Recreate the piece below in my project. If I don't say which framework I use, ask once, then build it in that framework (React, Vue, Svelte, Angular, Astro, plain HTML/CSS/JS or anything else). Keep the behavior, motion, colors, spacing and accessibility exactly as described. Keep the code clean and commented for beginners.
## What it is
A friendly landing page for a money app for freelancers ("Jarful") that splits every payment into tax, savings and spending. Its signature is the live split:
- Pick or type an invoice amount and set your split with three linked sliders that always add up to 100%.
- Press "Get paid €1,200". Coins in each jar's colour pop out of the invoice card, arc through the air and drop into three SVG jars. The jars' wavy liquid rises with a springy overshoot, and each total counts up.
Sections: a full illustrated hero under a light nav, the split board, a dark "Made for people who invoice" row of three illustrated cards, an animated FAQ, and a footer.
## Palette
Cream #f3eee3, paper #e9e1d1, ink #141210, muted #6b645a, lines rgba(20,18,16,0.14), orange #ff5a1f (CTA, the tax jar, the open FAQ icon), focus ring #2b35ff. Jar colours: tax #ff5a1f, savings #2b35ff, spending #1f8a5b. Grain from an inline SVG feTurbulence sits on the illustration placeholders. Type is system-ui at weight 900 with tight tracking. The orange CTA has a hard 4px ink shadow that presses in when clicked.
## Layout
- Nav: sits over the hero in cream, with a jar-shaped logo mark (a rounded outline half-filled with orange), the lowercase wordmark and a cream "Try the split" pill.
- Hero: at least 680px tall, with the illustration covering it and the copy on the left (max 560px): a two-line headline up to 6.4rem, a lede, and the orange CTA with a note.
- Split board (paper card): at 900px and wider, a 380px controls column beside the jars.
- Controls: an invoice card with a huge editable € amount and three preset chips, a fieldset of three sliders (the track fills in the jar colour, the thumb is a ringed dot, and the label shows the % and €), and the big button.
- Jars: three SVG jars (lid, glass outline, shine stroke, liquid clipped to the jar). The liquid is two wave paths sliding opposite ways. The liquid level is 0.12 plus 0.7 times the balance divided by the biggest balance. Below each jar: its name, the counting total (it bumps when it lands) and a hint.
- People: a dark band with three 1:1 rounded illustrations that tilt slightly on hover, each with a heading and a line.
- FAQ: the heading beside three questions. Each is a button with a plus that turns into a minus inside a circle that fills orange. Answers open by animating grid-template-rows from 0fr to 1fr.
## Images
- landing-money-hero-21.jpg (16:9): a woodworker.
- landing-money-courier-22.jpg, landing-money-translator-23.jpg and landing-money-tattoo-24.jpg (1:1).
All are grainy illustrations. Until a file exists, each frame shows a grainy colour field.
## Motion
- Coins: about 1 per 10% of the split, each on a 1s Web Animations path that pops in, arcs up, spins, drops into the jar and fades. They are staggered by 70ms and by 120ms per jar.
- Liquid level: a 1.2s spring (cubic-bezier 0.34, 1.4, 0.5, 1). Waves loop over 2.6s and 3.8s.
- Totals count up over 900ms and bump when the coins land.
- Hero copy rises in steps, and FAQ answers slide open over 0.5s.
## Accessibility
- The amount is a labelled number input, and the presets use aria-pressed.
- Sliders are native range inputs with aria-valuetext ("30%, €360") inside a fieldset with a legend.
- The jars area is aria-live="polite".
- FAQ buttons use aria-expanded and aria-controls, and closed answers are inert.
- Coins are decorative and leave the DOM once they land.
- prefers-reduced-motion: no coins, waves, spring or count-up.
## Reference implementation
The original is written in React with one plain CSS file. Dependencies: none (plain React and CSS). Translate it faithfully; do not add new libraries unless my framework needs them.
### MoneyPage.tsx
```tsx
"use client";
import { useEffect, useRef, useState, type CSSProperties } from "react";
import "./money-page.css";
/**
* MoneyPage: a friendly page for a money app for freelancers ("Jarful").
* Its signature is the live split: press "Get paid" and coins fly from the
* invoice into three jars (tax, savings, spending) that fill with a wavy
* liquid. Three linked sliders always add up to 100%.
* It is a demo: nothing is sent anywhere.
*/
const JARS = [
{
id: "tax",
name: "Tax",
color: "#ff5a1f",
hint: "Ready when the bill comes",
},
{
id: "save",
name: "Savings",
color: "#2b35ff",
hint: "For slow months and holidays",
},
{
id: "spend",
name: "Spending",
color: "#1f8a5b",
hint: "Yours to use, guilt-free",
},
];
const PRESETS = [450, 1200, 3800];
const PEOPLE = [
{
img: "/images/landing-money-courier-22.jpg",
alt: "Illustration of a courier in an orange jacket on a cargo bike in the rain under a floating umbrella",
tone: "#2b35ff",
who: "Couriers",
line: "Paid weekly, in bits. Jarful catches every one.",
},
{
img: "/images/landing-money-translator-23.jpg",
alt: "Illustration of an older translator at a kitchen table at night with dictionaries, a cat and a glowing lamp",
tone: "#7a3b5c",
who: "Translators",
line: "One big invoice a month, split before you see it.",
},
{
img: "/images/landing-money-tattoo-24.jpg",
alt: "Illustration of a tattoo artist raising both arms in celebration next to a puffy green plant",
tone: "#ff5a1f",
who: "Tattoo artists",
line: "Cash, card and deposits, all in the right jar.",
},
];
const FAQ = [
[
"Is my money safe?",
"Your jars are real accounts at a licensed partner bank, protected up to €100,000.",
],
[
"Can I change the split?",
"Any time, for each payment or for all of them. Moving money between jars is instant and free.",
],
[
"Does it file my taxes?",
"No, but at the end of the year you get one tidy export your accountant will love.",
],
];
const eur = new Intl.NumberFormat("en-IE", {
style: "currency",
currency: "EUR",
maximumFractionDigits: 0,
});
/** Move one share and spread the difference over the others, keeping a total of 100. */
function rebalance(split: number[], i: number, v: number) {
const rest = split.reduce((a, b, k) => (k === i ? a : a + b), 0);
const left = 100 - v;
const next = split.map((s, k) =>
k === i ? v : rest ? Math.round((s / rest) * left) : Math.round(left / 2),
);
const drift = 100 - next.reduce((a, b) => a + b, 0);
const fix = next.findIndex((_, k) => k !== i);
next[fix] += drift;
return next;
}
/* ------------------------------------------------------------------ */
function Art({
src,
alt,
tone,
className = "",
}: {
src: string;
alt: string;
tone: string;
className?: string;
}) {
const img = useRef<HTMLImageElement>(null);
const [missing, setMissing] = useState(false);
useEffect(() => {
const el = img.current;
if (el && el.complete && el.naturalWidth === 0) setMissing(true);
}, []);
return (
<div
className={`gu-jar__art ${className}`}
style={{ "--tone": tone } as CSSProperties}
>
{!missing && (
<img
ref={img}
src={src}
alt={alt}
loading="lazy"
onError={() => setMissing(true)}
/>
)}
</div>
);
}
/** Counts smoothly to a new value whenever it changes. */
function Money({ value }: { value: number }) {
const [shown, setShown] = useState(value);
const from = useRef(value);
useEffect(() => {
const start = from.current;
const dur = window.matchMedia("(prefers-reduced-motion: reduce)").matches
? 1
: 900;
let raf = 0;
let t0 = 0;
const tick = (now: number) => {
if (!t0) t0 = now;
const p = Math.min(1, (now - t0) / dur);
const v = start + (value - start) * (1 - Math.pow(1 - p, 3));
from.current = v;
setShown(v);
if (p < 1) raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => cancelAnimationFrame(raf);
}, [value]);
return <>{eur.format(Math.round(shown))}</>;
}
function Jar({
name,
color,
level,
jarRef,
}: {
name: string;
color: string;
level: number;
jarRef: (el: HTMLDivElement | null) => void;
}) {
const id = `gu-jar-clip-${name}`;
return (
<div
className="gu-jar__jar"
ref={jarRef}
style={{ "--c": color, "--level": level } as CSSProperties}
>
<svg viewBox="0 0 140 180" aria-hidden="true">
<defs>
<clipPath id={id}>
<path d="M30 34 h80 v10 q14 8 14 26 v86 q0 18 -18 18 h-72 q-18 0 -18 -18 v-86 q0 -18 14 -26 z" />
</clipPath>
</defs>
<g clipPath={`url(#${id})`}>
<rect
x="0"
y="0"
width="140"
height="180"
className="gu-jar__glass-bg"
/>
<g className="gu-jar__liquid">
<path
className="gu-jar__wave gu-jar__wave--back"
d="M0 10 q17.5 -10 35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 v200 h-280 z"
/>
<path
className="gu-jar__wave"
d="M0 10 q17.5 -10 35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 t35 0 v200 h-280 z"
/>
</g>
</g>
<path
d="M30 34 h80 v10 q14 8 14 26 v86 q0 18 -18 18 h-72 q-18 0 -18 -18 v-86 q0 -18 14 -26 z"
className="gu-jar__glass"
/>
<rect
x="26"
y="18"
width="88"
height="18"
rx="6"
className="gu-jar__lid"
/>
<path d="M34 70 q-6 30 0 70" className="gu-jar__shine" />
</svg>
</div>
);
}
/* ------------------------------------------------------------------ */
function Splitter() {
const [amount, setAmount] = useState(1200);
const [split, setSplit] = useState([30, 20, 50]);
const [balances, setBalances] = useState([620, 410, 380]);
const [paid, setPaid] = useState(0);
const stage = useRef<HTMLDivElement>(null);
const invoice = useRef<HTMLDivElement>(null);
const jars = useRef<(HTMLDivElement | null)[]>([]);
const shares = split.map((p) => Math.round((amount * p) / 100));
const top = Math.max(...balances, 1);
const getPaid = () => {
const add = shares;
const st = stage.current;
const inv = invoice.current;
const reduce = window.matchMedia(
"(prefers-reduced-motion: reduce)",
).matches;
if (st && inv && !reduce) {
const s = st.getBoundingClientRect();
const a = inv.getBoundingClientRect();
const ax = a.left + a.width / 2 - s.left;
const ay = a.top + a.height / 2 - s.top;
split.forEach((p, j) => {
const jar = jars.current[j];
if (!jar) return;
const b = jar.getBoundingClientRect();
const bx = b.left + b.width / 2 - s.left;
const by = b.top + b.height * 0.25 - s.top;
const n = Math.max(1, Math.round(p / 10));
for (let k = 0; k < n; k++) {
const coin = document.createElement("span");
coin.className = "gu-jar__coin";
coin.style.background = JARS[j].color;
st.appendChild(coin);
const mx = (ax + bx) / 2 + (k - n / 2) * 8;
const my = Math.min(ay, by) - 90 - k * 6;
coin
.animate(
[
{
transform: `translate(${ax}px, ${ay}px) scale(0.4)`,
opacity: 0,
},
{
transform: `translate(${ax}px, ${ay}px) scale(1)`,
opacity: 1,
offset: 0.12,
},
{
transform: `translate(${mx}px, ${my}px) scale(1.1) rotate(180deg)`,
offset: 0.55,
},
{
transform: `translate(${bx}px, ${by}px) scale(0.7) rotate(360deg)`,
opacity: 1,
offset: 0.95,
},
{
transform: `translate(${bx}px, ${by + 20}px) scale(0.4)`,
opacity: 0,
},
],
{
duration: 1000,
delay: j * 120 + k * 70,
easing: "cubic-bezier(0.45, 0, 0.25, 1)",
fill: "both",
},
)
.finished.then(() => coin.remove())
.catch(() => coin.remove());
}
});
}
window.setTimeout(
() => {
setBalances((b) => b.map((v, i) => v + add[i]));
setPaid((n) => n + 1);
},
reduce ? 0 : 900,
);
};
return (
<section
className="gu-jar__split"
id="jar-try"
aria-labelledby="jar-s-title"
>
<div className="gu-jar__split-head">
<h2 id="jar-s-title" className="gu-jar__h2">
Watch a payment split itself.
</h2>
<p className="gu-jar__muted">
Pick an invoice, set your rules, press the button.
</p>
</div>
<div className="gu-jar__board" ref={stage}>
<div className="gu-jar__controls">
<div className="gu-jar__invoice" ref={invoice}>
<p className="gu-jar__muted">Invoice paid</p>
<label className="gu-jar__amount">
<span className="sr-only">Amount in euros</span>
<span aria-hidden="true">€</span>
<input
type="number"
min={1}
max={100000}
value={amount}
onChange={(e) =>
setAmount(
Math.max(0, Math.min(100000, Number(e.target.value) || 0)),
)
}
/>
</label>
<div className="gu-jar__presets">
{PRESETS.map((p) => (
<button
key={p}
type="button"
aria-pressed={amount === p}
onClick={() => setAmount(p)}
>
{eur.format(p)}
</button>
))}
</div>
</div>
<fieldset className="gu-jar__rules">
<legend>Your split</legend>
{JARS.map((j, i) => (
<label
key={j.id}
style={
{ "--c": j.color, "--p": `${split[i]}%` } as CSSProperties
}
>
<span className="gu-jar__rule-head">
<span>{j.name}</span>
<output>
{split[i]}%{" "}
<span className="gu-jar__muted">
{eur.format(shares[i])}
</span>
</output>
</span>
<input
type="range"
min={0}
max={100}
value={split[i]}
aria-valuetext={`${split[i]}%, ${eur.format(shares[i])}`}
onChange={(e) =>
setSplit(rebalance(split, i, Number(e.target.value)))
}
/>
</label>
))}
</fieldset>
<button
type="button"
className="gu-jar__cta"
onClick={getPaid}
disabled={!amount}
>
Get paid {eur.format(amount)}
</button>
</div>
<div className="gu-jar__jars" aria-live="polite">
{JARS.map((j, i) => (
<div key={j.id} className="gu-jar__slot">
<Jar
name={j.id}
color={j.color}
level={0.12 + (balances[i] / top) * 0.7}
jarRef={(el) => {
jars.current[i] = el;
}}
/>
<p className="gu-jar__jar-name">{j.name}</p>
<p className="gu-jar__jar-sum" data-bump={paid % 2}>
<Money value={balances[i]} />
</p>
<p className="gu-jar__muted gu-jar__jar-hint">{j.hint}</p>
</div>
))}
</div>
</div>
</section>
);
}
/* ------------------------------------------------------------------ */
export function MoneyPage() {
const [open, setOpen] = useState(0);
return (
<div className="gu-jar">
<nav className="gu-jar__nav" aria-label="Main">
<a href="#" className="gu-jar__logo">
<span className="gu-jar__logo-mark" aria-hidden="true" />
jarful
</a>
<a href="#jar-try" className="gu-jar__pill">
Try the split
</a>
</nav>
<header className="gu-jar__hero">
<Art
src="/images/landing-money-hero-21.jpg"
alt="Illustration of a woodworker in a sawdust apron smiling at her phone while three puffy coins float above it"
tone="#1b1713"
className="gu-jar__hero-art"
/>
<div className="gu-jar__hero-copy">
<h1 className="gu-jar__h1">
Get paid.
<br />
It's already sorted.
</h1>
<p className="gu-jar__lede">
Jarful splits every payment the second it lands: tax set aside,
savings topped up, and the rest is yours to spend.
</p>
<div className="gu-jar__hero-actions">
<a href="#jar-try" className="gu-jar__cta">
See it split
</a>
<p className="gu-jar__muted">Free for your first €10,000.</p>
</div>
</div>
</header>
<Splitter />
<section className="gu-jar__people" aria-labelledby="jar-p-title">
<h2 id="jar-p-title" className="gu-jar__h2">
Made for people who invoice.
</h2>
<ul>
{PEOPLE.map((p, i) => (
<li key={p.who} style={{ "--i": i } as CSSProperties}>
<Art src={p.img} alt={p.alt} tone={p.tone} />
<h3>{p.who}</h3>
<p className="gu-jar__muted">{p.line}</p>
</li>
))}
</ul>
</section>
<section className="gu-jar__faq" aria-labelledby="jar-f-title">
<h2 id="jar-f-title" className="gu-jar__h2">
Questions.
</h2>
<div>
{FAQ.map(([q, a], i) => (
<div key={q} className="gu-jar__q" data-open={open === i}>
<h3>
<button
type="button"
aria-expanded={open === i}
aria-controls={`jar-a-${i}`}
onClick={() => setOpen(open === i ? -1 : i)}
>
{q}
<span aria-hidden="true" />
</button>
</h3>
<div
id={`jar-a-${i}`}
className="gu-jar__a"
role="region"
aria-label={q}
inert={open !== i}
>
<div>
<p>{a}</p>
</div>
</div>
</div>
))}
</div>
</section>
<footer className="gu-jar__foot">
<p className="gu-jar__logo">
<span className="gu-jar__logo-mark" aria-hidden="true" />
jarful
</p>
<p className="gu-jar__muted">
Made for freelancers, by former freelancers.
</p>
</footer>
</div>
);
}
```
### money-page.css
```css
/* Jarful: cream paper, near-black, three jar colours that mean something. */
.gu-jar {
--bg: #f3eee3;
--paper: #e9e1d1;
--ink: #141210;
--muted: #6b645a;
--line: rgb(20 18 16 / 0.14);
--orange: #ff5a1f;
--focus: #2b35ff;
--ease: cubic-bezier(0.22, 1, 0.36, 1);
--grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
container-type: inline-size;
background: var(--bg);
color: var(--ink);
font-family:
system-ui,
-apple-system,
"Segoe UI",
sans-serif;
line-height: 1.5;
overflow-x: clip;
}
.gu-jar *,
.gu-jar *::before,
.gu-jar *::after {
box-sizing: border-box;
}
.gu-jar a {
color: inherit;
}
.gu-jar :focus-visible {
outline: 3px solid var(--focus);
outline-offset: 3px;
}
.gu-jar .sr-only {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.gu-jar__muted {
color: var(--muted);
}
.gu-jar__h1,
.gu-jar__h2 {
margin: 0;
font-weight: 900;
letter-spacing: -0.045em;
line-height: 0.92;
text-wrap: balance;
}
.gu-jar__h1 {
font-size: clamp(3rem, 7.2cqi, 6.4rem);
}
.gu-jar__h2 {
font-size: clamp(2.3rem, 5.2cqi, 4.4rem);
}
.gu-jar .gu-jar__cta {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 56px;
padding: 0 28px;
border: 0;
border-radius: 999px;
background: var(--orange);
color: var(--ink);
font: inherit;
font-size: 1.05rem;
font-weight: 800;
text-decoration: none;
cursor: pointer;
transition:
transform 0.3s var(--ease),
box-shadow 0.3s;
box-shadow: 0 4px 0 var(--ink);
}
.gu-jar .gu-jar__cta:hover {
transform: translateY(-2px);
box-shadow: 0 6px 0 var(--ink);
}
.gu-jar .gu-jar__cta:active {
transform: translateY(3px);
box-shadow: 0 1px 0 var(--ink);
}
.gu-jar .gu-jar__cta:disabled {
opacity: 0.4;
cursor: not-allowed;
}
/* ---------- Illustrations ---------- */
.gu-jar__art {
position: relative;
overflow: hidden;
background:
var(--grain) 0 0 / 220px,
radial-gradient(40% 45% at 70% 55%, var(--orange), transparent 70%),
radial-gradient(30% 30% at 30% 30%, #d7ff3a55, transparent 70%),
var(--tone);
}
.gu-jar__art img {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
/* ---------- Nav + hero ---------- */
.gu-jar__nav {
position: relative;
z-index: 2;
display: flex;
align-items: center;
justify-content: space-between;
padding: 22px 5%;
color: var(--bg);
}
.gu-jar__logo {
display: inline-flex;
align-items: center;
gap: 10px;
margin: 0;
font-size: 1.5rem;
font-weight: 900;
letter-spacing: -0.05em;
text-decoration: none;
}
.gu-jar__logo-mark {
width: 22px;
height: 26px;
border-radius: 6px 6px 10px 10px;
background: linear-gradient(180deg, transparent 40%, var(--orange) 40%);
box-shadow: inset 0 0 0 2.5px currentColor;
}
.gu-jar .gu-jar__pill {
display: inline-flex;
align-items: center;
min-height: 44px;
padding: 0 18px;
border-radius: 999px;
background: var(--bg);
color: var(--ink);
font-weight: 800;
text-decoration: none;
}
.gu-jar__hero {
position: relative;
display: flex;
align-items: center;
min-height: 680px;
margin-top: -88px;
padding: 120px 5% 72px;
color: var(--bg);
isolation: isolate;
}
.gu-jar__hero-art {
position: absolute;
inset: 0;
z-index: -1;
}
.gu-jar__hero-art img {
object-position: 70% 30%;
}
.gu-jar__hero-art::after {
content: "";
position: absolute;
inset: 0;
background: linear-gradient(
100deg,
rgb(20 16 14 / 0.82) 0%,
rgb(20 16 14 / 0.55) 42%,
transparent 72%
);
}
@container (max-width: 700px) {
.gu-jar__hero-art::after {
background: linear-gradient(
0deg,
rgb(20 16 14 / 0.88) 0%,
rgb(20 16 14 / 0.6) 55%,
rgb(20 16 14 / 0.25) 100%
);
}
}
.gu-jar__hero-copy {
max-width: 560px;
}
.gu-jar__hero-copy > * {
animation: gu-jar-rise 0.9s var(--ease) both;
}
.gu-jar__hero-copy > :nth-child(2) {
animation-delay: 0.12s;
}
.gu-jar__hero-copy > :nth-child(3) {
animation-delay: 0.24s;
}
@keyframes gu-jar-rise {
from {
opacity: 0;
transform: translateY(24px);
}
}
.gu-jar__lede {
max-width: 40ch;
margin: 22px 0 30px;
font-size: 1.15rem;
opacity: 0.85;
}
.gu-jar__hero-actions {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 16px 22px;
}
.gu-jar__hero .gu-jar__muted {
color: rgb(243 238 227 / 0.7);
margin: 0;
}
/* ---------- Splitter ---------- */
.gu-jar__split {
padding: 96px 5%;
}
.gu-jar__split-head .gu-jar__muted {
margin: 14px 0 0;
font-size: 1.1rem;
}
.gu-jar__board {
position: relative;
display: grid;
gap: 32px;
margin-top: 40px;
padding: clamp(20px, 3cqi, 36px);
border-radius: 32px;
background: var(--paper);
}
@container (min-width: 900px) {
.gu-jar__board {
grid-template-columns: 380px 1fr;
align-items: center;
gap: 48px;
}
}
.gu-jar__controls {
display: grid;
gap: 22px;
}
.gu-jar__invoice {
padding: 20px;
border-radius: 22px;
background: var(--bg);
box-shadow: 0 2px 0 var(--line);
}
.gu-jar__invoice > p {
margin: 0 0 4px;
font-size: 0.9rem;
font-weight: 700;
}
.gu-jar__amount {
display: flex;
align-items: baseline;
gap: 4px;
font-size: 3rem;
font-weight: 900;
letter-spacing: -0.05em;
}
.gu-jar__amount input {
width: 100%;
min-width: 0;
border: 0;
border-bottom: 2px dashed var(--line);
background: none;
color: inherit;
font: inherit;
font-variant-numeric: tabular-nums;
appearance: textfield;
}
.gu-jar__amount input::-webkit-inner-spin-button {
appearance: none;
}
.gu-jar__amount input:focus {
outline: none;
border-bottom-color: var(--focus);
}
.gu-jar__presets {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 12px;
}
.gu-jar__presets button {
min-height: 38px;
padding: 0 14px;
border: 1px solid var(--line);
border-radius: 999px;
background: none;
color: inherit;
font: inherit;
font-size: 0.88rem;
font-weight: 700;
cursor: pointer;
transition:
background-color 0.3s,
color 0.3s;
}
.gu-jar__presets button[aria-pressed="true"] {
background: var(--ink);
color: var(--bg);
}
.gu-jar__rules {
display: grid;
gap: 14px;
margin: 0;
padding: 0;
border: 0;
}
.gu-jar__rules legend {
margin-bottom: 8px;
padding: 0;
font-weight: 800;
}
.gu-jar__rules label {
display: grid;
gap: 4px;
}
.gu-jar__rule-head {
display: flex;
justify-content: space-between;
font-weight: 700;
}
.gu-jar__rule-head output {
font-variant-numeric: tabular-nums;
}
.gu-jar__rules input {
width: 100%;
height: 32px;
margin: 0;
background: transparent;
appearance: none;
cursor: pointer;
}
.gu-jar__rules input::-webkit-slider-runnable-track {
height: 10px;
border-radius: 999px;
background: linear-gradient(
90deg,
var(--c) var(--p),
rgb(20 18 16 / 0.1) var(--p)
);
}
.gu-jar__rules input::-moz-range-track {
height: 10px;
border-radius: 999px;
background: linear-gradient(
90deg,
var(--c) var(--p),
rgb(20 18 16 / 0.1) var(--p)
);
}
.gu-jar__rules input::-webkit-slider-thumb {
width: 24px;
height: 24px;
margin-top: -7px;
border: 3px solid var(--c);
border-radius: 50%;
background: var(--bg);
appearance: none;
}
.gu-jar__rules input::-moz-range-thumb {
width: 18px;
height: 18px;
border: 3px solid var(--c);
border-radius: 50%;
background: var(--bg);
}
.gu-jar__jars {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
align-items: end;
}
.gu-jar__slot {
text-align: center;
}
.gu-jar__jar svg {
display: block;
width: 100%;
max-width: 180px;
margin: 0 auto;
overflow: visible;
}
.gu-jar__glass-bg {
fill: rgb(255 255 255 / 0.45);
}
.gu-jar__liquid {
transform: translateY(calc(184px - var(--level) * 150px));
transition: transform 1.2s cubic-bezier(0.34, 1.4, 0.5, 1);
}
.gu-jar__wave {
fill: var(--c);
animation: gu-jar-wave 2.6s linear infinite;
}
.gu-jar__wave--back {
fill: color-mix(in srgb, var(--c) 55%, #fff);
animation-duration: 3.8s;
animation-direction: reverse;
transform: translateY(-4px);
}
@keyframes gu-jar-wave {
to {
translate: -70px 0;
}
}
.gu-jar__glass {
fill: none;
stroke: var(--ink);
stroke-width: 3;
}
.gu-jar__lid {
fill: var(--ink);
}
.gu-jar__shine {
fill: none;
stroke: #fff;
stroke-width: 5;
stroke-linecap: round;
opacity: 0.55;
}
.gu-jar__jar-name {
margin: 10px 0 0;
font-weight: 800;
}
.gu-jar__jar-sum {
margin: 0;
font-size: clamp(1.4rem, 2.6cqi, 2.1rem);
font-weight: 900;
letter-spacing: -0.04em;
font-variant-numeric: tabular-nums;
}
.gu-jar__jar-sum[data-bump="1"] {
animation: gu-jar-bump-a 0.7s var(--ease) 0.9s;
}
.gu-jar__jar-sum[data-bump="0"] {
animation: gu-jar-bump-b 0.7s var(--ease) 0.9s;
}
@keyframes gu-jar-bump-a {
30% {
transform: scale(1.12);
}
}
@keyframes gu-jar-bump-b {
30% {
transform: scale(1.12);
}
}
.gu-jar__jar-hint {
margin: 2px 0 0;
font-size: 0.85rem;
}
.gu-jar__coin {
position: absolute;
top: 0;
left: 0;
z-index: 5;
width: 22px;
height: 22px;
margin: -11px 0 0 -11px;
border-radius: 50%;
box-shadow:
inset 0 -3px 0 rgb(0 0 0 / 0.25),
inset 0 2px 0 rgb(255 255 255 / 0.4);
pointer-events: none;
}
/* ---------- People ---------- */
.gu-jar__people {
padding: 96px 5%;
background: var(--ink);
color: var(--bg);
}
.gu-jar__people .gu-jar__muted {
color: rgb(243 238 227 / 0.65);
}
.gu-jar__people ul {
display: grid;
gap: 24px;
margin: 48px 0 0;
padding: 0;
list-style: none;
}
@container (min-width: 760px) {
.gu-jar__people ul {
grid-template-columns: repeat(3, 1fr);
}
}
.gu-jar__people .gu-jar__art {
aspect-ratio: 1;
border-radius: 28px;
transition:
transform 0.6s var(--ease),
border-radius 0.6s var(--ease);
}
.gu-jar__people li:hover .gu-jar__art {
transform: rotate(calc((var(--i) - 1) * 2deg + 1deg)) scale(1.02);
border-radius: 40px;
}
.gu-jar__people h3 {
margin: 18px 0 4px;
font-size: 1.6rem;
font-weight: 900;
letter-spacing: -0.03em;
}
.gu-jar__people p {
margin: 0;
}
/* ---------- FAQ ---------- */
.gu-jar__faq {
display: grid;
gap: 32px;
padding: 96px 5%;
}
@container (min-width: 860px) {
.gu-jar__faq {
grid-template-columns: 0.7fr 1.3fr;
}
}
.gu-jar__q {
border-top: 1px solid var(--line);
}
.gu-jar__q:last-child {
border-bottom: 1px solid var(--line);
}
.gu-jar__q h3 {
margin: 0;
}
.gu-jar__q button {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
width: 100%;
min-height: 72px;
padding: 0;
border: 0;
background: none;
color: inherit;
font: inherit;
font-size: 1.3rem;
font-weight: 800;
letter-spacing: -0.02em;
text-align: left;
cursor: pointer;
}
.gu-jar__q button > span {
position: relative;
flex: none;
width: 36px;
height: 36px;
border-radius: 50%;
background: var(--paper);
transition:
background-color 0.3s,
transform 0.5s var(--ease);
}
.gu-jar__q button > span::before,
.gu-jar__q button > span::after {
content: "";
position: absolute;
inset: 50% 10px auto;
height: 2.5px;
margin-top: -1px;
border-radius: 2px;
background: currentColor;
}
.gu-jar__q button > span::after {
transform: rotate(90deg);
transition: transform 0.5s var(--ease);
}
.gu-jar__q[data-open="true"] button > span {
background: var(--orange);
transform: rotate(180deg);
}
.gu-jar__q[data-open="true"] button > span::after {
transform: rotate(0deg);
}
.gu-jar__a {
display: grid;
grid-template-rows: 0fr;
transition: grid-template-rows 0.5s var(--ease);
}
.gu-jar__a > div {
overflow: hidden;
}
.gu-jar__q[data-open="true"] .gu-jar__a {
grid-template-rows: 1fr;
}
.gu-jar__a p {
max-width: 52ch;
margin: 0 0 24px;
color: var(--muted);
font-size: 1.05rem;
}
.gu-jar__foot {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
gap: 16px;
padding: 40px 5%;
border-top: 1px solid var(--line);
}
.gu-jar__foot p {
margin: 0;
}
@media (prefers-reduced-motion: reduce) {
.gu-jar *,
.gu-jar *::before,
.gu-jar *::after {
animation: none !important;
transition: none !important;
}
}
```
You might also want
Next piece: Glass prism 3D heroE-bike launch page with colour wipe
Landing pages, advanced
Boutique hotel page with a sun-path day
Landing pages, advanced
Coffee roaster subscription page
Landing pages, advanced



