Updated
Verified Badge
NewCustomize
Size20px
Scallops10
Installation
npx shadcn@latest add https://uibrik.com/r/verified-badge.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/verified-badge/verified-badge.tsx"use client"; import { AnimatePresence, motion, useInView, useReducedMotion } from "motion/react"; import { useId, useRef, useState } from "react"; import { cn } from "@/lib/utils"; const EASE_OUT: [number, number, number, number] = [0.23, 1, 0.32, 1]; export type VerifiedVariant = "blue" | "gold" | "grey"; const VARIANTS: Record<VerifiedVariant, { color: string; label: string }> = { blue: { color: "#1d9bf0", label: "Verified account" }, gold: { color: "#d9a20b", label: "Verified organisation" }, grey: { color: "#7d8d9a", label: "Official account" }, }; export type VerifiedBadgeProps = { /** Blue for people, gold for organisations, grey for officials. */ variant?: VerifiedVariant; /** Overrides the variant's colour. */ color?: string; /** Diameter in px. */ size?: number; /** Scallops around the seal. */
Adds the files to
components/uibrik/verified-badge and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/verified-badge.Usage
import { VerifiedBadge } from "@/components/uibrik/verified-badge/verified-badge";<VerifiedBadge size={20} lobes={10} animate variant="blue" // color="…" // label="…" // detail="…"/>Where to use Verified Badge
Profiles and handles
The seal sits inline after a name at text size, and its tooltip says what kind of account it is.
Pairs with Social Avatar
Marketplaces and reviews
Gold for verified sellers and blue for verified buyers tell two kinds of trust apart at a glance.
Pairs with Rating Feedback
Official announcements
A grey seal marks posts from an official account without making them louder than everything else.
Pairs with Announcement Pill
Props
VerifiedBadge- size
- Type number
- 20
- Diameter.
- lobes
- Type number
- 10
- Scallops around the seal.
- animate
- Type boolean
- true
- Draw the seal in when it first scrolls into view.
- variant
- Type "blue" | "gold" | "grey"
- "blue"
- Blue for people, gold for organisations, grey for officials.
- color
- Type string
- –
- Overrides the variant's colour.
- label
- Type string
- –
- Tooltip and accessible name. Defaults to the variant's label.
- detail
- Type string
- –
- Second line in the tooltip, such as since when.
- className
- Type string
- –
- Classes for the badge.