Docs
Stacked avatar
Stacked avatar
Stacked avatar.
Installation
pnpm dlx shadcn@latest add "https://akasha-ui.pages.dev/r/styles/default/stacked-avatar.json"
Usage
import { StackedAvatar } from "<path-to-ui-components>/stacked-avatar";
const avatars = [
{ src: "https://github.com/akashaorg.png", alt: "@akashaorg" },
{ src: "https://github.com/akashaorg.png", alt: "@akashaorg" },
{ src: "https://github.com/akashaorg.png", alt: "@akashaorg" },
{ src: "https://github.com/akashaorg.png", alt: "@akashaorg" },
];
return (
<StackedAvatar size={avatars.length}>
{(index) => (
<ProfileAvatar>
<ProfileAvatarImage src={avatars[index].src} alt={avatars[index].alt} />
<ProfileAvatarFallback />
</ProfileAvatar>
)}
</StackedAvatar>
);
Props
Name | Type | Description |
---|---|---|
size | number | Total number of avatars. |