Component packs › Giftwrap › Gift Button

Gift Button

The box lid pops off with its bow and wobbles while your action runs, then drops back on with a bounce.

Gift Button is a button from Giftwrap, a component pack with 6 gift controls: Reward and reveal controls made of printed paper, satin ribbon and a bow that ties itself. Price: $2 for the whole pack.

Built with: async lid, wobble while busy, label swap.

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.

Gift Button props

PropTypeDefaultDescription
labelstring
doneLabelstring
action() => Promise<unknown> | unknownwaits 1.2 sRuns on press; the lid stays up until it settles. Default: waits 1.2 s.
disabledboolean
darkbooleanfollows the pageForce the dark (true) or light (false) look. Default: follows the page.
autoplaynumber | falseShowcase mode: presses itself every N ms while visible.

Methods on the ref

Use it in React

import GiftButton from './GiftButton';

<GiftButton />

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

More in Giftwrap

Good for: Skeuomorphic UI.