Avatar Group
Stacked or spread avatars with an overflow count.
JA
MP
LK
+2
JA
MP
LK
SL
+1
Import
Section titled “Import”import { Avatars } from "@pelagornis/page/components";Example
Section titled “Example”The preview above renders this file. Copy it into src/components/ to start from it.
import { Avatars, Stack } from "@pelagornis/page/components";
const team = [ { alt: "Jihoon Ahn" }, { alt: "Mina Park" }, { alt: "Leo Kim" }, { alt: "Sora Lee" }, { alt: "Ren Ito" },];
export default function AvatarsDemo() { return ( <Stack gap="sizeLarge"> <Avatars avatars={team} max={3} /> <Avatars avatars={team} size="lg" layout="spread" max={4} /> </Stack> );}Use in MDX
Section titled “Use in MDX”Avatar Group can be written straight in an .mdx page. Import it below the frontmatter. It renders on the server, so no client directive is needed.
---title: Example---
import { Avatars } from "@pelagornis/page/components";
<Avatars avatars={[{ alt: "Jihoon Ahn" }, { alt: "Mina Park" }, { alt: "Leo Kim" }]} max={2} />Use in Markdoc
Section titled “Use in Markdoc”pageMarkdoc() registers a avatars tag for this component. Add the preset once in markdoc.config.mjs (see Use in Markdoc), then write the tag in any .mdoc page.
{% avatars avatars=[{alt: "Jihoon Ahn"}, {alt: "Mina Park"}, {alt: "Leo Kim"}] max=2 /%}Attributes use the same names and values as the React props.
Variants
Section titled “Variants”Values the component accepts for each variant prop.
| Prop | Values |
|---|---|
size | xs sm md lg xl |
layout | stack spread |
Anatomy
Section titled “Anatomy”Parts of the component and the data-refineui role each one renders.
| Part | Role |
|---|---|
root | avatars |
Reference
Section titled “Reference”- RefineUI · Avatar Group for design guidance and token detail.
- Use in MDX and Use in Markdoc for the general rules.