Avatar
A user image with initials fallback and a generic glyph when signed out.
Available in
Angular: available Vue: available React: available React Native: available
Usage
Ada Park
Product design
<div class="demo-stack">
<div class="demo-row" style="align-items: center">
<sone-avatar size="sm"><span soneAvatarFallback>AP</span></sone-avatar>
<sone-avatar><span soneAvatarFallback>SL</span></sone-avatar>
<sone-avatar size="lg"><span soneAvatarFallback>KM</span></sone-avatar>
<!-- No image and no fallback: the signed-out person glyph -->
<sone-avatar />
</div>
<!-- shape="square": a team, a workspace or an app -->
<div class="demo-row" style="align-items: center">
<sone-avatar shape="square" size="sm"><span soneAvatarFallback>AC</span></sone-avatar>
<sone-avatar shape="square"><span soneAvatarFallback>DS</span></sone-avatar>
<sone-avatar shape="square" size="lg"><span soneAvatarFallback>IO</span></sone-avatar>
</div>
<div class="demo-row" style="align-items: center">
<sone-avatar><span soneAvatarFallback>AP</span></sone-avatar>
<div>
<div>Ada Park</div>
<div style="color: var(--text-secondary); font-size: var(--font-size-sm)">Product design</div>
</div>
</div>
</div>Import
import {
SoneAvatarComponent,
SoneAvatarFallbackDirective,
SoneAvatarImageDirective,
} from "@surface-one/angular/avatar";API reference
SoneAvatarComponentComponent
| Name | Type | Default |
|---|---|---|
size | AvatarSize | "default" |
shape`square`: a rounded square (a team, a workspace, an app) instead of a circle. | AvatarShape | "circle" |