Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Data display
  4. Persona

Data display

Persona

A person at a glance: avatar with presence, a name and up to two more lines (role, status), in four sizes, with the text after or below the avatar and something at the end.

import { Persona } from '@alea/ui';

Examples

Persona

An avatar with presence, a name and up to two more lines, in four sizes; text after or below the avatar.

Ana Rivas
Bruno DíazProduct designer
Carla MendesDesign systems leadIn a meeting until 3 pm
Admin
Dario Silvadario@alea.devLast seen 2 hours ago
Eva LinFrontend engineer

Configurations

Every value of every property, side by side. Numbers match the legend below.

sm
md
lg
xl
online
away
busy
offline
after
below
  1. Sizesize
  2. Statusstatus
  3. Text PositiontextPosition

Anatomy

The parts of the component and the class that styles each one.

Measurements

Measured from the rendered component at 2x: height, width, padding, radius and icon.

Every size and space is a multiple of 4 px.

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-text-faint…
  • --alea-text-muted…

Space

  • --alea-space-2…
  • --alea-space-3…

Type

  • --alea-font-size-base…
  • --alea-font-size-lg…
  • --alea-font-size-md…
  • --alea-font-size-sm…
  • --alea-font-size-xs…
  • --alea-font-weight-medium…
  • --alea-font-weight-semibold…

Props

Persona props

A person at a glance: avatar with presence, name, and up to two more lines. For lists, cards, menus and comments.

PropTypeDefaultDescription
namerequiredstring-The person's (or team's) name.
classNamestring-Extra class names.
endReactNode-Something at the end: a badge, a button.
secondaryReactNode-A second line: role, email.
size"sm" | "md" | "lg" | "xl"'md'sm (24 px avatar, one line), md (40 px, default), lg (56 px), xl (80 px).
srcstring-Photo URL.
status"online" | "away" | "busy" | "offline"-A presence dot on the avatar.
tertiaryReactNode-A third line, shown from size lg: status message, last seen.
textPosition"after" | "below"'after'Text after the avatar (default) or below it, centered.

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

Variants
sizesmmdlgxl
statusonlineawaybusyoffline
textPositionafterbelow
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-persona.alea-persona-text.alea-persona-name.alea-persona-secondary.alea-persona-tertiary.alea-persona-end
Data attributes
data-size=smdata-text=belowdata-size=lgdata-size=xl

Accessibility

  • The avatar is named with the person and their presence, so the status is not only a color.
  • Text truncates with an ellipsis; give the full value somewhere else when it matters.

Do and don't

Do

  • Use it in lists, menus and cards wherever a person appears.

Don't

  • Don't make the whole persona a button and also put buttons in end.
Tested with axe, keyboard and screen reader roles