Components
Avatar represents a person or team with a profile photo, initials, or a default icon, from Meta's Astryx design system. Use it in comment headers, contact lists, chat messages, user cards, and anywhere you need to identify someone visually. Includes AvatarStatusDot and AvatarGroup with overflow.
npx @21st-dev/cli@beta add Astryxdesign/astryx-avatarLoading preview...
'use client';
import Avatar from '@/components/ui/astryx-avatar';
import {Theme} from '@astryxdesign/core/theme';
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
import {Stack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';
const NAMES = [
{name: 'John Doe', note: 'First + last'},
{name: 'Alice', note: 'Single name'},
{name: 'Bob Smith Johnson', note: 'Multi-word'},
{name: 'Dr. Sarah Connor', note: 'Prefixed'},
];
export default function AvatarInitialsFallback() {
return (
<Theme theme={neutralTheme}>
<div
style={{
minHeight: '100dvh',
display: 'grid',
placeItems: 'center',
padding: 24,
}}>
<Stack direction="horizontal" gap={6} vAlign="center">
{NAMES.map(({name, note}) => (
<Stack key={name} direction="vertical" gap={2} hAlign="center">
<Avatar name={name} size="medium" />
<Text type="supporting" color="secondary">
{note}
</Text>
</Stack>
))}
</Stack>
</div>
</Theme>
);
}
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...
Loading preview...