Kinetik UI

Avatar Stack

.md

Overlapping avatars that fan out one after another with names beneath, then tuck back in behind the first.

v1.0.0Live on webreact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add avatar-stack

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/avatar-stack.json

Install manually

  1. Install dependencies
    npx expo install react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/avatar-stack.tsx
    View source files

Usage

import { AvatarStack } from '@/components/kinetik/avatar-stack';

<AvatarStack
  people={[
    { id: 'a', name: 'Maya Lindqvist', image: mayaPhoto },
    { id: 'b', name: 'Leo Okafor' },
    { id: 'c', name: 'Ines Duarte' },
  ]}
  max={4}
/>;

When to use

  • Showing who is on a project, in a chat or at an event, in the space of one line.
  • Places where people sometimes want the names but not always.

When not to use

  • A full member list with roles and actions. Use a list screen.
  • A single person. Show one avatar with the name beside it.

Notes

  • Stacked, it shows max faces and a "+n" chip; spread out, it shows up to maxOpen faces with first names beneath.
  • Faces without an image show one or two initials. Set ringColor to the colour behind the stack so the overlaps look cut out.
  • It is one button for screen readers that names everyone (up to six, then "and n more") and says whether it is expanded.
  • With reduced motion the faces move at once.

Props

AvatarStackProps

PropTypeDefaultDescription
peoplerequiredreadonly Person[]—
maxnumber4Faces shown while stacked; the rest are counted in a "+n" chip. Defaults to 4.
maxOpennumber6Faces shown once spread out. Defaults to 6.
sizenumber40Avatar diameter. Defaults to 40.
ringColorstring—The colour around each avatar. Defaults to the theme background.
hapticsbooleantrueA light tap when it opens or closes. Defaults to true.
testIDstring—
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
Plain views and images; every face reads one shared value for its offset and name. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 0.94× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 145 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The faces spread and stack at once.
Screen readers
One button that names everyone and says whether the stack is expanded.
Touch target
The whole stack is the target, at least 44 pt tall.

Source files

components/kinetik/avatar-stack.tsx is in the Code tab of the preview above.