Updated
Social Avatar
NewCustomize
Hover
Size72px
Spread150°
Accounts5
Installation
npx shadcn@latest add https://uibrik.com/r/social-avatar.jsonInstall the packages
npm install @tabler/icons-react motionAdd the cn helper
Imports
cnfrom@/lib/utils, whichshadcn initcreates. Add it by hand without shadcn.Copy the source into your project
components/uibrik/social-avatar/social-avatar.tsx"use client"; import { IconCheck } from "@tabler/icons-react"; import { AnimatePresence, motion, useReducedMotion } from "motion/react"; import { useEffect, useId, useRef, useState } from "react"; import { cn } from "@/lib/utils"; import { BRANDS, isInk, type Brand, type BrandKey } from "../_brands/brands"; const EASE_OUT: [number, number, number, number] = [0.23, 1, 0.32, 1]; export type SocialLink = { /** One of the built-in marks, or your own `{ name, color, path }` on a 24 × 24 grid. */ brand: BrandKey | Brand; /** Shown above the mark, and what a press copies when there's no href. */ handle: string; /** Open this link instead of copying the handle. */ href?: string; }; export type SocialAvatarProps = { /** Avatar image. Without one, the initials show. */ src?: string; name: string; /** Line under the name. */
Adds the files to
components/uibrik/social-avatar and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/social-avatar.Usage
import { SocialAvatar } from "@/components/uibrik/social-avatar/social-avatar";<SocialAvatar name="Daniel Reyes" links={[{ brand: …, handle: … }]} trigger="hover" size={72} spread={150} src="/registry/social-avatar/daniel.webp" subtitle="Product designer" onCopy={(link) => {}} // open={false} // onOpenChange={(open) => {}}/>Where to use Social Avatar
Author and speaker bios
One avatar holds every profile, so a byline stays a single face until someone wants to follow.
Pairs with Follow Button
Team and about pages
Each teammate's accounts open from their own photo, instead of a row of small icons under every card.
Pairs with Team Roster
Creator link pages
Real logos in their own colours read at a glance, and a press copies the handle for apps that need it typed.
Pairs with Verified Badge
Props
SocialAvatar- trigger
- Type "hover" | "click"
- "hover"
- What opens the marks. Touch always opens on tap.
- size
- Type number
- 72
- Avatar diameter.
- spread
- Type number
- 150
- Width of the arc the marks fan across. Widens on its own when marks would touch.
- namerequired
- Type string
- –
- Name under the avatar, and the initials when there's no photo.
- src
- Type string
- –
- Avatar image.
- subtitle
- Type string
- –
- Line under the name.
- linksrequired
- Type { brand; handle; href? }[]
- –
- Accounts in order. brand is a built-in key (x, github, linkedin, dribbble, instagram, youtube, threads, bluesky, discord) or your own { name, color, path }. Without href, a press copies the handle.
- open / onOpenChange
- Type boolean / (open) => void
- –
- Controlled open state. defaultOpen for uncontrolled.
- onCopy
- Type (link) => void
- –
- Called after a handle is copied.
- className
- Type string
- –
- Classes for the wrapper.