Updated
Status Stamp
APPROVED
Customize
Slam0.20s
Ink0.60s
Text size48px
Installation
npx shadcn@latest add https://uibrik.com/r/status-stamp.jsonInstall the packages
npm install motionAdd the cn helper
Imports
cnfrom@/lib/utils, whichshadcn initcreates. Add it by hand without shadcn.Copy the source into your project
components/uibrik/status-stamp/status-stamp.tsx"use client"; import { cn } from "@/lib/utils"; import { animate, motion } from "motion/react"; import { useEffect, useId, useRef } from "react"; // `play` counts presses of a card's Change button. 0 means the card has not // been pressed yet, so every effect renders its resting state without // animating on page load. export type EffectProps = { play: number }; /** 0.9 × the effect size (text-lg at the default). */ const SIZE_SM = "text-[length:calc(var(--text-effect-size,1.25rem)*0.9)] leading-[1.556]"; const EASE_OUT = [0.23, 1, 0.32, 1] as const; // The entry for the nth press, wrapping around the list. const pick = <T,>(list: T[], play: number) => list[((play % list.length) + list.length) % list.length]; // 25 — A rubber stamp comes down from above, lands with a small shake, and // its ink soaks in: a noise mask starts patchy and fills to solid. Each stamp // carries its status colour, so the outcome reads before the word does. const STAMPS = [ { word: "APPROVED", tone: "text-emerald-600 bg-emerald-500/5 dark:text-emerald-400", tilt: "-rotate-3" },
Adds the files to
components/uibrik/status-stamp and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/status-stamp.Usage
import { StatusStamp } from "@/components/uibrik/status-stamp/status-stamp";<StatusStamp play={0} slamDuration={0.2} inkDuration={0.6}/>Where to use Status Stamp
Approval states
An ink stamp slamming down as approved, in review or rejected makes status unmissable.
Document workflows
Stamps suit expense, invoice and contract approvals.
Application results
A decisive stamp works for results of applications or orders.
Pairs with Pricing Receipt
Props
StatusStamp- slamDuration
- Type number
- 0.2
- Time for the stamp to come down.
- inkDuration
- Type number
- 0.6
- Time for the ink to soak in.
- playrequired
- Type number
- –
- Each change plays the effect again; 0 shows its resting state.