Hacktron Design System

Avatar

A user or organization image, shown as a circle or a square.

CircleS
SquareS
<template>  <Avatar shape="Circle" size="sm" /></template>

Props

Name Type Default
srcstring-
altstring-
shape"Circle" | "Square""Circle"
size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"

Guidelines

Do

  • Use shape="Circle" (the default) for real user avatars - it's what UAvatar renders out of the box.
  • Reach for shape="Square" only where the surrounding layout is already square-cornered (dense tables, integration lists) - Circle is the default everywhere else.

Don't

  • Don't mix shapes within the same list of avatars (e.g. an AvatarGroup) - pick one shape per context.

AvatarGroup

An overlapping stack of avatars.

CBA
<template>  <UAvatarGroup>    <Avatar alt="A" />    <Avatar alt="B" />    <Avatar alt="C" />  </UAvatarGroup></template>

LabeledAvatar

An avatar paired with a name, and an optional subtitle and status badge.

Subtitle + badge
S

Shadcn

Status

Pro plan

Small size
S

Shadcn

<template>  <LabeledAvatar name="Shadcn" subtitle="Pro plan" :badge="true" /></template>

Props

Name Type Default
namestring-
subtitlestring-
srcstring-
badgebooleanfalse
size"default" | "sm""default"

Guidelines

Do
  • Use the default size wherever there's room for a name and secondary line (account menus, member lists) - the badge prop is meant for a lightweight status flag like "Owner" or "Invited", not for arbitrary content.
  • Use sm for dense contexts (comment threads, activity feeds) where only the name matters.
  • Pass src when you have a real avatar image; omit it to fall back to initials via UAvatar.
Don't
  • Don't show subtitle or badge at size="sm" - the component doesn't render them there on purpose, since there's no room and it would crowd the row. Use size="default" instead if you need that context.
  • Don't use this for a bare avatar with no accompanying text - use UAvatar directly.