Component packs › Tangram › Success Button

Success Button

While your action runs the icon scrambles through figures; on success it locks back into the square and a tick is cut across it.

Success Button is a button from Tangram, a component pack with 6 tangram controls: Seven tangram pieces that rearrange into every state of your interface. Price: $2 for the whole pack.

Built with: promise aware, figure cycle, tick on success.

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.

Success Button props

PropTypeDefaultDescription
labelstring
pendingLabelstring
doneLabelstring
action() => void | Promise<unknown>Runs on press; return a promise to keep the pieces moving until it settles.
disabledboolean
theme"light" | "dark"
autoplaynumber | falseShowcase mode: presses itself every N ms while visible.

Methods on the ref

Use it in React

import SuccessButton from './SuccessButton';

<SuccessButton />

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

More in Tangram

Good for: 404 and empty states.