Skip to contentKino
Skip to Content

Avatar

A person's photo over their initials, and a stack of them with a count for the rest. The photo fades in once it loads, the picture of a face pointed at lifts so the whole of it shows, and faces glide aside when someone joins or leaves.

npx shadcn add https://kinoui.com/r/avatar.json
Share on

Examples

  • MC
    Maya ChenProduct designer
  • TA
    Tomás AlvarezInvited, no photo yet

Default

The photo sits over the initials, which show while it loads and when there is none or it fails. Leave alt empty where the name is written beside it.

MC
MC
MC
MC

Sizes

Each size is as tall as a button of the same size, at every density, so an avatar lines up with the controls beside it.

Q4 launch plan

Kino · Edited 2 min ago by Maya Chen

3 viewing

Stack

Faces that are links lift when pointed at, and open a card in a HoverCardGroup that glides from face to face. When someone joins or leaves, the others glide to make room. The count can open a list of the rest.

KN-412
Payment sheet jumps when the keyboard opens on iOS
MCPR
KN-409
Export a project as CSV with every custom field
AOLF+3 more
KN-401
Onboarding checklist
JB
KN-397
Rate limit the public API per workspace and per key
KWIS+6 more

Count

A stack of plain faces names the people it shows in its aria-label, and the count says how many more. It shows 99+ past 99 and rolls when it changes.

Installation

npx shadcn@latest add https://kinoui.com/r/avatar.json
Files
lib/reduce-motion.tslib/resize.tslib/run-progress.tslib/highlight.tslib/flow.tslib/refs.tslib/roll.tsxcomponents/kino/avatar.tsx
Packages
@base-ui/reactclass-variance-authority

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

Avatar

PropTypeDefaultDescription
size"xs""sm""default""lg"the stack’s, or "default"The control height it matches. Inside a stack it takes the stack’s size.

AvatarStack

PropTypeDefaultDescription
size"xs""sm""default""lg""default"The size of every avatar in it.

AvatarStackCount

PropTypeDefaultDescription
countnumberNoneHow many people the stack doesn’t show.

Data attributes

AttributeOnDescription
data-loadingAvatarImagePresent while the photo loads.
data-leavinga copy of a face in AvatarStackPresent on the copy of a face that left, while it fades where it was.

CSS variables

VariableSet it onDefaultDescription
--avatar-stack-ringAvatarStack, or anything above itvar(--color-background)The colour of the ring that cuts each face out of the one before. Set it to the colour behind the stack.
--avatar-stack-liftAvatarStack, or anything above it0.25remHow far the picture of a face pointed at lifts.

Accessibility

  • Give the stack an aria-label. When its faces are plain pictures, put the names of those it shows in it, and the count says how many more; when they are links, give each link the person’s name.
  • The count reads as it shows, “+4 more”, and past 99 adds the exact number.
  • Faces that are links or buttons overlap less, so each one keeps a 24px target.
  • Its links and buttons get the focus ring, and one focused from the keyboard comes to the front, so its ring shows whole.
  • When the system asks for less motion, nothing lifts or glides, and faces only fade in and out.