Image URL. When set (and it loads) it wins over the initials/icon fallback.
name
string
n/a
Full name. Used for the accessible label and to derive the initials + tint.
size
NockerlAvatarSize
'md'
Pixel diameter ramp.
shape
NockerlAvatarShape
'circle'
Circle (the Android default) or a 12px rounded square.
presence
Presence
n/a
Presence/status dot, bottom-right. Status colors only, never the brand cyan.
disabled
boolean
false
Inert + desaturated (never invisible) state.
onClick
(e: React.MouseEvent<HTMLButtonElement>) => void
n/a
Makes the avatar a focusable button (e.g. the top-bar → settings tap target). Receives the MouseEvent so trigger callers can anchor to e.currentTarget.
Also accepts the native <button> attributes (e.g. onClick, disabled, id, aria-*, data-*), forwarded straight through, plus a forwarded ref.
AvatarStack takes people: { name; src? }[], max (default 4), and size. It overlaps the first max avatars and appends a +N overflow chip.
Parameter
Type
Default
Description
name *
String
n/a
The person/session name. Drives the initials ("Ada Lovelace" → "AL") and the default accessible name. A blank name renders the "?" placeholder glyph.
modifier
Modifier
Modifier
External modifier (placement, extra sizing).
painter
Painter?
null
Optional avatar image, drawn cropped to the silhouette. null → initials(name) on the soft accent wash. Takes a Painter (e.g. painterResource(…) or a Coil painter), with no image-loader dependency.
Silhouette. CircleShape (shipped); the rounded-square variant is a proposed alternative.
presence
Color?
null
Optional presence-dot color (a dot* palette token), bottom-right, notched into the host surface. Decorative: fold the state into contentDescription, never color alone (law §13).
presenceRing
Color
cardSurface1
The notch-ring color. Match the HOST surface the avatar sits on so the dot reads anchored, not floating.
contentDescription
String?
null
Accessible name; defaults to name.
SwiftUI exposes the avatar as a View plus chained modifiers; presence and size
come from the view modifiers rather than a flat parameter list.
Style
Type
Default
Description
NockerlAvatar(name:image:)
View
n/a
The disc. Resolves image → initials(name) → person icon, clipped to a Circle with a top catch-light + hairline ring.
Bottom-right status dot in a surface-colored notch; .streaming reuses PulsingDot. Status colors only.
NockerlAvatarStack(people:max:)
View
n/a
Overlapping group; appends a +N overflow chip past max.
Cross-platform drift (tracked for reconciliation)
The look is approved off the shipped Android avatar; the rest is designed here and
awaits sign-off:
Component vs. inline: Android now shipsNockerlAvatar
(com.dizyx.nockerl.design.components), the published wrapper that folds the raw
Image().clip(CircleShape) pattern (GlobalTopBar + AvatarSettingsSheet) into one
disc with the ratified size ramp + image → initials ladder. Voice ships none; the
Swift API above is intended.
Fallbacks: the published Kotlin avatar covers image → initials (a blank name
renders the "?" placeholder). A dedicated person-icon fallback is not yet
shipped; it’s still a proposed rung across all platforms.
Presence & stacks: the published Kotlin avatar takes an optional bottom-right
presence dot (a palette-dot color, notched into the host surface). The overlapping
+Nstack is still designed-only: there is no NockerlAvatarStack on any
platform yet.
Shape: only circle is shipped (the published Kotlin default). rounded is
proposed.