avatar-stack
kibo-ui-registry/avatar-stackFreeComponent
Avatar Stack is a component that allows you to stack and overlap avatars.
Live preview
live · rendered by the registry
Rendered by Kibo UI Registry on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://www.kibo-ui.com/r/avatar-stack.jsonSource
1import { Children, type ReactNode } from "react";2import { cn } from "@/lib/utils";34export type AvatarStackProps = {5 children: ReactNode;6 className?: string;7 animate?: boolean;8 size?: number;9};1011export const AvatarStack = ({12 children,13 className,14 animate = false,15 size = 40,16 ...props17}: AvatarStackProps) => (18 <div19 className={cn(20 "-space-x-1 flex items-center",21 animate && "hover:space-x-0 [&>*]:transition-all",22 className23 )}24 {...props}25 >26 {Children.map(children, (child, index) => {27 if (!child) {28 return null;29 }3031 return (32 <div33 className={cn(34 "size-full shrink-0 overflow-hidden rounded-full",35 '[&_[data-slot="avatar"]]:size-full',36 className37 )}38 style={{39 width: size,40 height: size,41 maskImage: index42 ? `radial-gradient(circle ${size / 2}px at -${size / 4 + size / 10}px 50%, transparent 99%, white 100%)`43 : "",44 }}45 >46 {child}47 </div>48 );49 })}50 </div>51);
Files it writes
More from Kibo UI Registry
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| announcementannouncement | Kibo UI Registry | Components | Free | no deps | |
| bannerbanner | Kibo UI Registry | Components | Free | 2 deps | |
| calendarcalendar | Kibo UI Registry | Components | Free | 3 deps | |
| choiceboxchoicebox | Kibo UI Registry | Components | Free | 2 deps | |
| code-blockcode-block | Kibo UI Registry | Components | Free | 5 deps · 2 files | |
| color-pickercolor-picker | Kibo UI Registry | Components | Free | 3 deps | |
| comboboxcombobox | Kibo UI Registry | Components | Free | 2 deps | |
| comparisoncomparison | Kibo UI Registry | Components | Free | 2 deps |
