Code
In context
Install · Free Web Component
One file, no dependencies. Aurora preset, every other option included. Host it yourself so your visitors never load anything from our servers.
The shadcn command adds a typed React wrapper for you. Using the file directly? Custom elements work in React as-is; for type checking add:
Pro · React + TypeScript Pro
One payment of $4.99, yours forever. Use it in unlimited personal and commercial projects; no resale.
- React components —
HaloAvatarandHaloAvatarStack— with TypeScript types and the full source - Sunset, Mint and Mono tints, plus custom tints from Brand Fit
- The vanilla Web Component with every tint, a demo page, README and license
Attributes & props
| Name | Type | Default | Description |
|---|---|---|---|
| name | string | '' | The person. Read out by screen readers with the status, and the source of the initials and their wash colour. |
| src | URL | — | The photo. It lazy-loads over the initials and, if it fails, the initials simply stay. |
| status | 'online' | 'busy' | 'away' | 'offline' | 'speaking' | — | The ring: flowing light when online, coral when busy, dim amber when away, none when offline, waves travelling outward while speaking. Leave it out for a plain avatar. |
| size | number (px) | 48 (44 in a stack) | Diameter; the ring, the bezel and the initials scale with it. |
| shape | 'circle' | 'squircle' | 'circle' | Round, or a soft square for teams, workspaces and apps. |
| <img> / <span data-name> | children | — | A stack: each child is a person — <img alt="Name" src data-status> or <span data-name="Name" data-status>. From script: el.people = [{ name, src, status }]. |
| max | number | all | Avatars shown before the rest collapse into a "+N" pearl bead (the hidden names become its tooltip). |
| overlap | number (0..0.6) | 0.28 | How far neighbours overlap, as a share of the size. |
| interactive | boolean | off | Makes every avatar a button: Tab and the arrow keys move along the stack, Enter fires select with detail.name and detail.index. |
| active | number | — | Keeps one avatar of the stack raised with its label showing — for tours and "who is talking". |
| label | string | 'N people' | Accessible name of the stack. |
| theme | 'light' | 'dark' | 'light' | White porcelain or dark. |
| tint Pro | 'aurora' | 'sunset' | 'mint' | 'mono' | object | 'aurora' | Colours of the online and speaking ring, or a custom tint. Busy and away keep their coral and amber. Free build ships Aurora only. |
Presence is never colour alone: the status is part of each avatar’s accessible name (“Mira Okafor, online”). A stack is a group; without interactive its avatars are images, with it they are real buttons. The name label sits above the avatar and the ring glows past its box, so leave about 40px of room above a stack and do not put it in a parent with overflow: hidden. The initials’ wash is picked from the name, so the same person always gets the same colour — pastel in light, deep in dark. All CSS, no WebGL; the ring stops flowing under prefers-reduced-motion.
More components
- Pearl Steps
- Pearl Skeleton
- Pearl Table
- Pearl Empty
- Tide Slide
- Pearl Code
- Ink Sphere
- Frost Card
- Holo Card
- Stream Text
- Lens Compare
- Pearl Dial
- Nova Rating
- Pearl Check
- Pearl Input
- Glass Toast
- Pearl Select
- Glass Sheet
- Pearl Accordion
- Glass Tip
- Pearl Calendar
- Glass Nav
- Pearl Tabs
- Glass Command
- Pearl Chip
- Roll Counter
- Glass Marquee
- Reveal Text
- Mesh Gradient
- Silk Waves
- Dot Field
- Plasma Orb
- Voice Wave
- Plush Buddy
- Gummy Agent
- Glass Tabbar
- Glass Menu
- Pearl Pricing
- Glass Bento
- Quote Wall
- Glass Cta
- Magnet Button
- Beam Border
- Spotlight Card
- Scratch Reveal
- Glass Sidebar
- Pearl Pagination
- Pearl Breadcrumb
- Glass Dock
- Pearl Slider
- Pearl Segmented
- Liquid Metal Button
- Mercury Orb
- Prompt Input
- Voice Orb
- Aurora Ring
- Glass Toggle
- Firefly Button
- Pearl Button
- Pearl Loader
- Alien Face
- Prism Button
- Liquid Carousel
- Orbit Carousel
- Deck Carousel