Component packs › Minted › Piggy Savings

Piggy Savings

A glazed ceramic piggy bank takes each coin through the slot on its back and rocks on its feet with the weight.

Piggy Savings is a savings goal from Minted, a component pack with 6 savings components: Savings and payment controls with metal coins that flip, stack, drop and pile up. Price: $2 for the whole pack.

Built with: lit ceramic, two-pivot rocking, goal bar.

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.

Piggy Savings props

PropTypeDefaultDescription
valuenumber85Amount saved. Default 85.
goalnumber200Goal. Default 200.
stepnumber5Amount per deposit. Default 5.
currencystring
titlestring"New bike"Goal name. Default "New bike".
disabledboolean
onChange(value: number) => void
autoplaynumber | falseShowcase mode: deposits every N ms while visible.

Methods on the ref

Use it in React

import PiggySavings from './PiggySavings';

<PiggySavings />

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

More in Minted

Good for: Pricing and payment.