Avatar
Avatar component displaying profile image with automatic text initials fallback.
v0.2.0NativeWindStyleSheetiOSAndroidExpo Go
Preview
Installation
npx nativra-cli add avatarWrites Avatar.tsx to components/ui, rewrites imports to your aliases and records hashes in nativra.lock.json, along with 1 registry dependency. Existing files are never overwritten without asking.
Want to try it first? Open it in the playground: a real React Native project in your browser, with this item installed by the CLI.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | undefined | Remote image URL |
| fallback | string | required | Initials or text rendered when image is absent or loading |
| size | "sm" | "md" | "lg" | "xl" | "md" | Avatar dimension preset |
Source
Exactly what the CLI writes, before your import aliases are applied.
Dependencies
Used by
- Account Settings FlowTemplateEnterprise SaaS account, organization seats, security sessions, and billing management flow.
- App HeaderBlockVersatile enterprise application navigation header with branding, back navigation, search, action buttons, notifications badge, and user avatar.
- App SidebarBlockEnterprise collapsible application navigation sidebar with grouped navigation items, active route indicators, user profile card, and footer actions.
- Chat & Messaging FlowTemplateIn-app support and customer messaging template with conversation threads, speech bubbles, and keyboard-avoiding input bar.
- Chat BubbleBlockA chat message with sender grouping, delivery ticks, a failed state with retry, and an avatar for other people.
- Notification ItemBlockInteractive mobile notification card with user avatar, timestamp, unread indicator dot, and action buttons.
- Settings FlowTemplateA comprehensive mobile settings screen template with account profile header, preference toggles, security options, and logout dialog.
- Social FeedTemplateInfinite-scroll feed with post cards, optimistic likes, comments and native share, pull to refresh, and error and end states.
- Team Member RowBlockEnterprise team member row with avatar, identity details, role selector pill, and action menu.
- User ProfileBlockReady-to-use mobile profile card with avatar, verified badge, stats, and actions.