Social proof
Avatar stack, optional star rating and one line of text.
Preview
Avatars pop in one after another when the row comes into view. With reduced motion turned on, it renders the plain layout.
Rated 4.8 out of 5
Joined by 300 indie teams (sample)
Rated 4.8 out of 5
Joined by 300 indie teams (sample)
Installation
Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.
Usage
import { SocialProof } from "@/components/custom/social-proof";
<SocialProof
text="Joined by 300 indie teams"
rating={4.8}
people={[{ name: "Ana", avatar: "/ana.webp" }]}
/>import { SocialProofMotion } from "@/components/custom/social-proof/social-proof-motion";
<SocialProofMotion text="Joined by 300 indie teams" people={people} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text* (required) | string | – | One line. Keep it true. |
| people* (required) | { name: string; avatar?: string }[] | – | Avatar stack; initials when there is no image. |
| rating | number | – | Average out of 5; stars plus the number in words. |
| ...props | React.ComponentProps<"div"> | – | Any other div attribute goes to the root element. |
| Prop | Type | Default | Description |
|---|---|---|---|
| text* (required) | string | – | One line. Keep it true. |
| people* (required) | { name: string; avatar?: string }[] | – | Avatar stack; initials when there is no image. |
| rating | number | – | Average out of 5; stars plus the number in words. |
| ...props | React.ComponentProps<"div"> | – | Any other div attribute goes to the root element. |
Accessibility
- Avatars are decorative; the rating is announced as “Rated 4.8 out of 5”.
- The motion version follows the visitor's reduced-motion setting and never hides content before it animates.