Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Collections

  • QuestionCard
  • Table
  • Book3D
  • ProTable
  • PricingTable
  • JsonViewer
  • EditableTable
  • List
  • Descriptions
  • RowActions
  • Tree
  • Card
  • Carousel
  • Video
  • Audio
  • BentoGrid
  • Image
  • MagicCard
  • AnimatedList
  • Marquee
  • Sortable
  • Kanban
  • DesignCanvas
  • LayerTree
  • StageDraw
  • SlideDeck
  • PresenterView
  • ComponentPicker
  • EventStream
  • QueueLane
  • DocumentSheet
  • Novel reader
  • Scheduler
  • Org classroom
  • Danmaku
  • LiveChat
  • LivePlayer
  • LogViewer
  • FileTree
  • CodeReviewThread
  • VirtualList
  • InfiniteScroll
  • LogoLoop
  • BounceCards
  • CardSwap
  • ChromaGrid
  • CircularGallery
  • DomeGallery
  • FlyingPosters
  • InfiniteMenu
  • MagicBento
  • ScrollStack
  • ProfileCard
  • TiltedCard
  • PixelCard
  • DecayCard
  • ReflectiveCard
  • Folder

Charts and Diagrams

  • Flow
  • Diagram
  • Paper
  • SequenceDiagram
  • Sankey
  • Sparkline
  • Funnel
  • Treemap
  • Gantt
  • Heatmap
  • ContributionGraph
  • Legend
  • Chart
  • WorldMap

Information

  • ImageViewer
  • LiveProductCard
  • DiffStat
  • ScoreRing
  • ScoreScale
  • Badge
  • Dot
  • StatusDot
  • Chip
  • FilterChip
  • Coupon
  • Tag
  • Annotation
  • Avatar
  • AvatarCircles
  • User
  • QRCode
  • Comment
  • RelativeTime
  • GitCommit
  • DeployStatus
  • ShieldBadge
  • AwardBadge
  • CreditCard
  • IconTile

Metrics

  • Stat
  • Statistic
  • Meter
  • Timeline
  • NumberTicker

Placeholders

  • Empty
  • Skeleton
  • Watermark

AvatarCircles

avatar-circles

Stacks overlapping avatars with an optional overflow count.

Usage

Basic usage

avatars are stacked in order (the latter over the former) to form an overlapping avatar group.

u1u2u3u4
tsx
const avatars = [
  { src: "/demo/avatar-1.jpg", alt: "u1" },
  { src: "/demo/avatar-2.jpg", alt: "u2" },
  { src: "/demo/avatar-3.jpg", alt: "u3" },
  { src: "/demo/avatar-4.jpg", alt: "u4" },
];

<AvatarCircles avatars={avatars} />

Extra Count

extraCount Add a "+N" circle at the end to indicate the number of people overflowing.

u1u2u3u4+9
tsx
<AvatarCircles avatars={avatars} extraCount={9} />

Size

size Control circle diameter and overlap spacing: sm / md / lg.

u1u2u3u4+9
u1u2u3u4+9
u1u2u3u4+9
tsx
<>
  <AvatarCircles avatars={avatars} extraCount={9} size="sm" />
  <AvatarCircles avatars={avatars} extraCount={9} size="md" />
  <AvatarCircles avatars={avatars} extraCount={9} size="lg" />
</>

When to use

Use AvatarCircles to show a compact group of participants or members. Use [Avatar] for one image or User for a person with name and description.

Import

ts
import { AvatarCircles, avatarCirclesItemVariants } from "@hulianui/ui"

Props

NameTypeDefaultDescription
avatars*AvatarCirclesItem[]-Ordered images; later items overlap earlier ones. See the table below.
extraCountnumber-Additional people rendered in a trailing "+N" circle.
size"sm" | "md" | "lg""md"Circle diameter preset.
classNamestring-Custom class name.

AvatarCirclesItem

NameTypeDefaultDescription
src *string-Avatar image URL. There is no fallback slot here (unlike a single Avatar), so a missing image leaves an empty circle.
altstring-Alternative text for the image.

Pitfalls

  • Every item requires src; unlike Avatar, the group has no fallback slot, so a failed image leaves an empty circle.
  • extraCount is display-only and is not derived from array length. Pass the actual overflow count.

Related

Sparkline · ImageViewer · LiveProductCard · DiffStat · ScoreRing · Badge

Playground

u1u2u3u4+9
<AvatarCircles avatars={avatars} extraCount={9} size="md" />
PreviousAvatarData DisplayNextUser

On this page

  • Usage
  • Documentation
    • When to use
    • Import
    • Props
    • Pitfalls
    • Related
  • Playground