Avatar Circles
Install: npx shadcn@latest add https://jiguang132.com/r/magic-ui/avatar-circles.json
Use case
Overlap avatar images and an additional-person count.
Native props used by the examples
Extracted from all local examples for this entry, grouped by imported module and native owner, including other Magic components used by compound demos. This is not an exhaustive API or a universal host variant. Inspect spread object declarations and the source types/defaults below.
| Owning component prop | Explanation | Example source |
|---|---|---|
MagicCard.mode (magic-card) | The owning component's native mode; consult its own union, not another library's mode. | examples/magic-card-demo-2.tsx |
MagicCard.glowFrom (magic-card) | The starting glow color in MagicCard orb mode. | examples/magic-card-demo-2.tsx |
MagicCard.glowTo (magic-card) | The ending glow color in MagicCard orb mode. | examples/magic-card-demo-2.tsx |
MagicCard.className (magic-card) | Classes on this native component; initialize Tailwind and its required CSS first. | examples/magic-card-demo-2.tsx |
MagicCard.children (magic-card) | Native child content; keep the owning component's text/element constraints. | examples/magic-card-demo-2.tsx |
AvatarCircles.avatarUrls (avatar-circles) | Avatar imageUrl/profileUrl pairs. | examples/magic-card-demo-2.tsx、examples/avatar-circles-demo.tsx |
AvatarCircles.numPeople (avatar-circles) | Additional-person count displayed after supplied avatars. | examples/avatar-circles-demo.tsx |
Interaction and state checks
- Magic Card Demo 2 —
magic-card-demo-2 - Avatar Circles Demo —
avatar-circles-demo
These names identify real example entries, not new component props or extra components. Check pointer/keyboard behavior, themes, small screens and failures for the selected example. Decorative effects must not invent disabled/error/submission states. Complete example installation includes the actual dependency closure.
Business integration boundary
avatarUrls contains imageUrl/profileUrl pairs; numPeople is an extra-count display, not a fetched user total.
Host and motion setup
Initialize Tailwind CSS v4, semantic CSS variables and the dark variant; import the independent local Registry namespace. Reuse an existing next-themes Provider without substituting JGuang UI/Base UI/HeroUI APIs. Mount effects in view and unmount offscreen; provide static alternatives for unavailable Canvas/WebGL or failed remote media. Respect prefers-reduced-motion and verify timer/RAF/observer/listener cleanup: stopping CSS alone does not prove the engine stopped. Examples provide no backend, login, payment or real AI stream. This practical guide is bilingual; detailed upstream references and demo text retain their original language.
Available examples
magic-card-demo-2, avatar-circles-demo
Demo state and mock data do not provide a backend service. Inspect the component props before wiring real data.
Installation
<Tabs defaultValue="cli"> <TabsList> <TabsTrigger value="cli">CLI</TabsTrigger> <TabsTrigger value="manual">Manual</TabsTrigger> </TabsList> <TabsContent value="cli">npx shadcn@latest add @magicui/avatar-circles
</TabsContent>
<TabsContent value="manual">
<Steps>
<Step>Copy and paste the following code into your project.</Step>
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>Usage
import { AvatarCircles } from "@/components/ui/avatar-circles"
<AvatarCircles
numPeople={99}
avatarUrls={[
{
imageUrl: "https://avatars.githubusercontent.com/u/16860528",
profileUrl: "https://github.com/dillionverma",
},
]}
/>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | The class name to be applied to the component |
numPeople | number | 99 | The number appearing in the last circle |
Complete example installation
The component command installs the component. Each example command also includes its actual imported components, native support UI, utilities and pinned dependencies. Helpers are not additional catalog components.
Magic Card Demo 2
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/avatar-circles/magic-card-demo-2.json
Default import: @/components/magicui/examples/magic-card-demo2
Dependencies: @radix-ui/react-slot@1.3.0, class-variance-authority@0.7.1, clsx@2.1.1, motion@12.42.2, next@16.4.0, next-themes@0.4.6, tailwind-merge@3.6.0
Avatar Circles Demo
npx shadcn@latest add https://jiguang132.com/r/magic-ui/examples/avatar-circles/avatar-circles-demo.json
Default import: @/components/magicui/examples/avatar-circles-demo
Dependencies: clsx@2.1.1, tailwind-merge@3.6.0
Minimal usage and theme
import Demo from '@/components/magicui/examples/magic-card-demo2';
import { ThemeProvider } from 'next-themes';
export default function Example() {
return <ThemeProvider attribute="class" defaultTheme="system" enableSystem><Demo /></ThemeProvider>;
}
Initialize Tailwind CSS v4, semantic color variables and the dark variant first. Reuse an existing next-themes provider rather than nesting another. Next Link examples require a Next.js environment; in static Vite projects adapt the demo links to your router without changing the native component API. Some media and tweets require network access. Examples do not supply authentication or backend services.
Source-backed parameter reference
Implementation signatures and types are generated from the pinned local source. Optional props, native inherited types, union branches and never exclusions are preserved. A forwardRef implementation's ref is a React reference, not an additional business prop.
AvatarCircles({
numPeople,
className,
avatarUrls,
}: AvatarCirclesProps)
interface Avatar {
imageUrl: string
profileUrl: string
}
interface AvatarCirclesProps {
className?: string
numPeople?: number
avatarUrls: Avatar[]
}