shadcn.io is not affiliated with official shadcn/ui
Avatar Stack Side Rail Hero Block for React
A compact hero for a community: a headline, a Shine Button and a second action beside a side rail of proof: a stack of member avatars over a line of social proof, then three stats in ruled rows.
Installation
Overview
A compact hero with an overlapping avatar stack as its signature visual, for React with Base UI. The section sits on the page's drafting lines: two rails at the edges of the page column that continue into the blocks above and below, a rule along its top edge that runs to the page's edges, and a plus mark on each crossing. A divider splits the column, with a plus mark where it meets the top rule. On the start side, an announcement pill links to community news, then a two-line headline for Guildhouse, a community of designers and engineers, a subtitle, a primary ShineButton and an outline Button as links, and a short trust line. On the other side a rail of proof holds seven large member avatars and a +99 count overlapping in a row over a line of social proof, and under a hairline that runs from the divider to the end rail, three stats in ruled rows: a label on one end and its figure on the other. It's built from Guides, Announcement, Status, Avatar, Shine Button and Button with Tailwind CSS, and each part fades in once with CSS transitions that stay still under reduced motion. Made for community platforms, open-source projects, team collaboration tools and any product where the people already on board make the case.
FAQ
How do I show my own members in the stack?
Edit MEMBERS at the top of the file: each member has initials and a picture's src, and an empty src shows the initials on a muted circle instead. Use square pictures of at least 96px, so they stay sharp at 48px on high-density screens; the avatars crop them to circles. Seven faces and a count read as a crowd; change the +99 in AvatarGroupCount to match. Ask your members before you show their faces.
How do I show real member counts?
The counts are plain text: the 12,400+ in the social proof line, the +99 on the stack and the three STATS. Fill them from your backend where your page loads its data, and round them (12,400+, not 12,417) so they don't go stale between deploys. Every figure is set in tabular numbers, so a new value doesn't shift its neighbours.
How are the lines and plus marks drawn?
They are the Guides component, an aria-hidden layer that draws the lines of the box it sits in. The page column (max-w-6xl, the same in every block) has Guides bleed marks="top" rules="top": two side rails that run the section's full height, so they join the rails of the blocks above and below, and one rule along the top edge that runs to the page's edges, with a plus on each crossing. The block below draws the next rule, so a stack of blocks never doubles a line. Inside, the divider is the rail's lg:border-s with Guides marks="start" rules="none" sides={false} for the plus where it meets the top rule, and the stats sit under Guides marks="top" rules="top" sides={false}, a rule from the divider to the end rail with a plus on each end; the rows below are split by divide-y. Every line is solid and is the theme's border colour, so it follows any preset.
How do screen readers read the avatar stack?
They skip it: the stack is aria-hidden, because its faces and its +99 say nothing a screen reader user could use, and the sentence under it, Loved by 12,400+ members across 60 countries, says it in words. The headline is the block's one h1, the pill and both calls to action are links named by their text, and the stats are a description list, so each number is read with its label.
How does the hero adapt to phones?
Below lg the two sides stack, with the copy first and the rail of proof under it behind a ruled line, and the copy aligns to the start. The headline wraps, balanced, at text-4xl, the two calls to action sit side by side or wrap, and both are on the first screen of a phone. In the rail, the stack of eight 40px circles fits in a row down to 320px, and each stat row keeps its label and figure on one line.
How do I make the avatars bigger or tighten the overlap?
Each avatar is size-10 (40px) on phones and size-12 (48px) from sm, set by *:data-[slot=avatar]:size-10 sm:*:data-[slot=avatar]:size-12 on the AvatarGroup, and the count has the same sizes; change both together. The overlap comes from AvatarGroup's negative spacing, and each avatar gets a ring in the page's colour so the edges stay crisp where they overlap. For a looser stack, add -space-x-1 to the AvatarGroup's classes.
Related
- Pro
Centered Founder Avatars Hero
Logos and social proofA centered hero led by its founders: a headline, a Shine Button and an outline button, then the three founders as separate hairline cells with avatar, role and background, and a line of backers.
- Pro
Left-Aligned Social Proof Bar Hero
Logos and social proofA compact start-aligned hero closed by a three-cell social proof bar on its own rule: an avatar stack with the user count, a five-star rating with the review count and a compliance mark.
- Pro
Split Avatar Grid Hero
Logos and social proofA compact split team hero: a headline, a Shine Button, a second action and a line of team facts beside a two-by-two grid of large avatars with names and roles in cells that share hairlines.
- Pro
Centered Star Rating Hero
TestimonialsA showcase centered hero led by its review score, with five stars and the average, a Shine Button, review-site badges and three reviews below in cells whose hairlines overshoot their corners.
- Pro
Centered Trusted By Logo Row Hero
Logos and social proofA compact centered hero built as bands: an announcement pill, a headline, two calls to action and three trust points, then a ruled label and a row of six customer wordmarks in divided cells.
- Pro
Hero With Stats
Stats and live dataA split hero with a headline, a Shine Button and a second action beside a rail of four key figures on shared hairlines, each with its period and a small bar trend.