Ask Natuna

Ask about the design system

Hi, I am Natuna.

Ask me about the design system: components, tokens, statuses, and how to use them.

Natuna can be wrong. The docs are the source of truth.

Skip to content
  • IntroductionPage
  • Ask NatunaAsk about the design systemPage
  • FoundationColor, type, number, effectPage
  • Components overviewPage
  • ThemesLight and dark modePage
  • NamingProperty and page namesPage
  • Privacy statementPage
  • Text-safe stepsFirst AA and AAA step per color rampSection
  • AccessibilityWCAG 2.2 AAA rulesSection
  • Dark modeThemesSection
  • Using it todayFigma file and React codeSection
  • Component statusDesign status and In ReactSection

Arrow keys to move, Enter to open, Esc to close.

Avatar

A visual representation of a user, team, or entity.

Status
Ready
Code
In React
Role
Display

Usage

This demo is live, and the code below it is the same code, imports included. The component lives in src/ui of this repository and is not published to npm yet.

Pastes as editable layers. Shadows are not exported.

import { useState } from "react";
import { Avatar, Input, type AvatarSize } from "@/ui";

const sizes: AvatarSize[] = ["sm", "md", "lg"];

export default function AvatarDemo() {
  const [name, setName] = useState<string>("Natuna Digilab");

  return (
    <>
      {sizes.map((size) => (
        <Avatar key={size} name={name || "?"} size={size} />
      ))}
      <Input label="Name" value={name} onChange={(e) => setName(e.target.value)} />
    </>
  );
}

Variants and states

Every specimen is the real component from src/ui, held in one state.

size sm32px
size md40px
size lg56px

Initials come from the first and last word of the name, so a one-word name gives one letter.

name "Budi"
name "Natuna Digilab"
name "Siti Nur Aisyah"

Pastes as editable layers. Shadows are not exported.

Props

name
string · default none
Full name. Initials come from the first and last word, and the name is the accessible label.
size
"sm" | "md" | "lg" · default "md"
32, 40, or 56px.
className
string · default ""
Extra classes, added after the size classes.
...rest
HTMLAttributes<HTMLSpanElement> · default none
Every other native span attribute. They are spread last, so an aria-label you pass replaces the name as the accessible label, and aria-hidden hides the avatar.

Figma to code

Figma properties by their exact names from Naming, and the React prop that carries each one. The table covers the shared properties that bear on this component; the Figma file decides which of them its component exposes. None means there is no prop for it yet.

📐 Size
size
sm, md, and lg.
📷 Show Image
None
No prop yet. Avatar renders initials only and takes no image source.
🎯 State
None
No prop. An avatar is not interactive, so it has no states.

Accessibility

What the code in src/ui does today, and what it leaves to you.

Keyboard

  • Not focusable and not interactive. Tab skips it.

Screen readers

  • Exposed as an image (role="img") named by the full name, so a screen reader reads Natuna Digilab, not N D.
  • The initials themselves are aria-hidden.

What you still need to do

  • Pass the full name, not initials. The name is the accessible label.
  • When the same name is written right next to the avatar, pass aria-hidden="true" so the name is not read twice.
  • If the avatar should open a profile, wrap it in a link or button that has its own name. The avatar is not focusable.

When to use

Shows identity in tables, comments, and headers.

Do and don't

Do

  • Pass the full name. Initials come from the first and last word, so Natuna Digilab shows ND.
  • Keep one size within the same list or table.

Don't

  • Pass initials or a nickname as the name. The name is also what a screen reader reads.
  • Expect Avatar to show a photo or a logo. It renders initials only and has no image prop yet.

4 of 16 other atoms, same role and ready ones first.

See all components

Status reflects the component tracker snapshot of 29 October 2026.