BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/Supabase Library/realtime-avatar-stack-nextjs

Avatar Stack with Realtime Presence

supabase-library/realtime-avatar-stack-nextjs
FreeComponent

Component which stack of avatars, tracked by realtime presence.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/realtime-avatar-stack-nextjs.json

Source

registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsxraw.githubusercontent.com/supabase/supabase/master/apps/ui-library/public/r/realtime-avatar-stack-nextjs.json
1import { cva, type VariantProps } from 'class-variance-authority'
2import * as React from 'react'
3
4import { cn } from '@/lib/utils'
5import { Avatar, AvatarFallback, AvatarImage } from '@/registry/default/components/ui/avatar'
6import { Tooltip, TooltipContent, TooltipTrigger } from '@/registry/default/components/ui/tooltip'
7
8const avatarStackVariants = cva('flex -space-x-4 -space-y-4', {
9 variants: {
10 orientation: {
11 vertical: 'flex-row',
12 horizontal: 'flex-col',
13 },
14 },
15 defaultVariants: {
16 orientation: 'vertical',
17 },
18})
19
20export interface AvatarStackProps
21 extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof avatarStackVariants> {
22 avatars: { name: string; image: string }[]
23 maxAvatarsAmount?: number
24}
25
26const AvatarStack = ({
27 className,
28 orientation,
29 avatars,
30 maxAvatarsAmount = 3,
31 ...props
32}: AvatarStackProps) => {
33 const shownAvatars = avatars.slice(0, maxAvatarsAmount)
34 const hiddenAvatars = avatars.slice(maxAvatarsAmount)
35
36 return (
37 <div
38 className={cn(
39 avatarStackVariants({ orientation }),
40 className,
41 orientation === 'horizontal' ? 'space-x-0' : 'space-y-0'
42 )}
43 {...props}
44 >
45 {shownAvatars.map(({ name, image }, index) => (
46 <Tooltip key={`${name}-${image}-${index}`}>
47 <TooltipTrigger asChild>
48 <Avatar className="hover:z-10">
49 <AvatarImage src={image} />
50 <AvatarFallback>
51 {name
52 ?.split(' ')
53 ?.map((word) => word[0])
54 ?.join('')
55 ?.toUpperCase()}
56 </AvatarFallback>
57 </Avatar>
58 </TooltipTrigger>
59 <TooltipContent>
60 <p>{name}</p>
61 </TooltipContent>
62 </Tooltip>
63 ))}
64
65 {hiddenAvatars.length ? (
66 <Tooltip key="hidden-avatars">
67 <TooltipTrigger asChild>
68 <Avatar>
69 <AvatarFallback>+{avatars.length - shownAvatars.length}</AvatarFallback>
70 </Avatar>
71 </TooltipTrigger>
72 <TooltipContent>
73 {hiddenAvatars.map(({ name }, index) => (
74 <p key={`${name}-${index}`}>{name}</p>
75 ))}
76 </TooltipContent>
77 </Tooltip>
78 ) : null}
79 </div>
80 )
81}
82
83export { AvatarStack, avatarStackVariants }

What it pulls in

npm packages

  • @supabase/ssr@latest
  • @supabase/supabase-js@latest

Other registry items

  • avatar
  • tooltip

Files it writes

  • registry/default/blocks/realtime-avatar-stack/components/avatar-stack.tsx
  • registry/default/blocks/realtime-avatar-stack/components/realtime-avatar-stack.tsx
  • registry/default/blocks/realtime-avatar-stack/hooks/use-realtime-presence-room.ts
  • registry/default/blocks/current-user-avatar/hooks/use-current-user-name.ts
  • registry/default/blocks/current-user-avatar/hooks/use-current-user-image.ts
  • registry/default/clients/nextjs/lib/supabase/client.ts
  • registry/default/clients/nextjs/lib/supabase/middleware.ts
  • registry/default/clients/nextjs/lib/supabase/server.ts

Facts

Registry
Supabase Library
Type
registry:component
Access
Free
Files written
8
Licence
Apache-2.0
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

supabase.com supabase/supabase on GitHub Raw registry item This item as JSON

More from Supabase Library

All 60 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Current User Avatarcurrent-user-avatar-nextjsSupabase LibraryComponentsFree2 deps · 6 files
Current User Avatarcurrent-user-avatar-reactSupabase LibraryComponentsFree1 dep · 4 files
Current User Avatarcurrent-user-avatar-react-routerSupabase LibraryComponentsFree2 deps · 5 files
Current User Avatarcurrent-user-avatar-tanstackSupabase LibraryComponentsFree2 deps · 5 files
Dropzone (File Upload)dropzone-nextjsSupabase LibraryComponentsFree4 deps · 5 files
Dropzone (File Upload)dropzone-reactSupabase LibraryComponentsFree3 deps · 3 files
Dropzone (File Upload)dropzone-react-routerSupabase LibraryComponentsFree4 deps · 4 files
Dropzone (File Upload)dropzone-tanstackSupabase LibraryComponentsFree4 deps · 4 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex