Display

Avatar group

Overlapping avatars for a team, a thread or the readers of a page. Past a few, the rest fold into “+N”, which opens the full list.

Installation

npx sinaui add avatar-group

Examples

Readers of a manuscript

Point at the group and it fans out; point at a face for the name. Press +3 for everyone else.

<script lang="ts">
	import AvatarGroup from '#lib/ui/AvatarGroup.svelte';

	const readers = [
		{ name: 'Ibn Sina' },
		{ name: 'Fatima al-Fihri' },
		{ name: 'Al-Khwarizmi' },
		{ name: 'Maryam al-Asturlabi' },
		{ name: 'Ibn al-Haytham' },
		{ name: 'Al-Biruni' },
		{ name: 'Lubna of Córdoba' }
	];
</script>

<AvatarGroup people={readers} label="7 readers" />

Small

For lists and dense rows.

<script lang="ts">
	import AvatarGroup from '#lib/ui/AvatarGroup.svelte';

	const circle = [{ name: 'Thabit ibn Qurra' }, { name: 'Hunayn ibn Ishaq' }, { name: 'Al-Kindi' }];
</script>

<AvatarGroup people={circle} size="sm" label="Translators" />

Large

For headers and profile pages.

<script lang="ts">
	import AvatarGroup from '#lib/ui/AvatarGroup.svelte';

	const circle = [{ name: 'Thabit ibn Qurra' }, { name: 'Hunayn ibn Ishaq' }, { name: 'Al-Kindi' }];
</script>

<AvatarGroup people={circle} size="lg" label="Translators" />

Props

PropTypeDefault
people{ name, src? }[] (required)
maxnumber: shown before “+N”4
size'sm' | 'md' | 'lg''md'
labelstring: names the group“N people”
onselect(person) => void

Set --ring to the background color behind the group, so the gaps between faces match it.

Keyboard

KeyDoes
TabMoves from face to face; each shows its name
Enter SpaceOn “+N”, opens the rest; Escape closes it

Accessibility

  • A group named with its count, so it's read as “7 readers” before the names.
  • Each face is named by its tooltip; the list behind “+N” has every other name.
  • Exactly one extra person shows as a face, never as “+1”.
  • With reduced motion, faces don't fan out or lift.
Introduction
Theming
Changelog
Button
Action button
Confirm button
Copy button
Hold to confirm
Split button
Calendar
Checkbox
Color picker
Combobox
Date picker
Date range picker
File drop
Form
Input
Mention input
Multi select
Number field
OTP input
Password input
Phone input
Radio cards
Radio group
Rich text editor
Search field
Segmented control
Select
Signature pad
Slider
Switch
Tag input
Upload
Wheel picker
Textarea
Time field
Toggle group
Toolbar
Alert dialog
Command palette
Context menu
Dialog
Drawer
Dropdown
Hover card
Popover
Tooltip
Announcement bar
Alert
Empty state
Meter
Progress
Rolling number
Skeleton
Spinner
Toast
Avatar
Avatar group
Badge
Card
Carousel
Chart
Chat
Code block
Data table
Folder
Kbd
Mind map
Resizable panels
Scroll area
Separator
Sortable
Table
Tag group
Virtual list
Audio player
Image
Image compare
Video
Visualizer
Breadcrumb
File tree
Menubar
Navigation menu
Pagination
Sidebar layout
Stepper
Tabs
Alarm clock
Clock
Dynamic island
Fluid orb
Hourglass
Stopwatch
Timer
AI chat
AI media
Auth
Board
Booking
Dashboard
File explorer
Messaging
Notifications
Settings
Team
Overview
Pricing
Agent chat
Calendar
Voice agent
Mail inbox
CMS
Blog
Marketing site
E-commerce
AI agents
SaaS landing page
SaaS app
Accordion
Dark theme
Light theme