Loading preview
Analog Clock
Data displayA station clock whose needle waits at twelve; drag the minute hand to set it by hand.
Overlapping avatars with a +N counter that spread apart on hover.
npx shadcn@latest add @venusui/avatar-stackRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/avatar-stack.tsxThe code behind the preview above.
avatar-stack-demo.tsx
import { AvatarStack } from "@/components/ui/avatar-stack"
const people = ["Ananya Iyer", "Marcus Webb", "Lucía Moreno", "Kenji Sato", "Fatima Noor", "Jonas Berg", "Chloé Martin", "Ravi Kapoor"].map((name) => ({ name }))
export default function AvatarStackDemo() {
return (
<div className="flex items-center gap-3">
<AvatarStack people={people} max={5} />
<p className="text-sm text-muted-foreground">8 people are viewing this page</p>
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| people | { name: string; src?: string }[] | — | People to show. Without src, initials are used. Required. |
| max | number | 5 | Avatars shown before “+N”. |
| size | number | 36 | Avatar size in pixels. |
All <div> props except children.
<img> so it works anywhere; swap in next/image in Next.js if you prefer.<img>.@next/next/no-img-element. Switch to next/image, or keep the plain image.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.A station clock whose needle waits at twelve; drag the minute hand to set it by hand.
Books on a wooden shelf whose spines lift on hover and pull out when selected, with a matching cover.
A messaging conversation that plays out with typing indicators; viewers can send replies too.