Applies to every preview on the site.
Installation
One command copies the source into your app — you own the code and can change anything.
After you add the file, import it like any local component:
import { Avatar } from "@/components/ui/avatar";Or add it with the CLI (installs any missing peers):
Usage
useKit(). Wrap your app in <KitProvider accent="#6366f1" radius={14}> to re-skin every component at once.Like this? There's a lot more in Pro Pro
12 full screens built from the same kit — install them the same way.
Props
| Prop | Type | Default |
|---|---|---|
| src Image URL. Fades in over the initials; falls back to them on error. | string | — |
| name Initials, the deterministic fallback colour and the accessibility label. | string | — |
| size 24 / 32 / 40 / 56 / 72pt, or any number. | "xs" | "sm" | "md" | "lg" | "xl" | number | "md" |
| shape Circle or rounded square (follows the kit radius). | "circle" | "rounded" | "circle" |
| fallback Soft tint with deep ink, flat fill, or an opt-in two-tone gradient. | "soft" | "solid" | "gradient" | "soft" |
| status Presence dot in a ring cut-out: filled, crescent, bar, hollow. | "online" | "away" | "busy" | "offline" | — |
| pulse Soft pulse behind the dot (off with reduce motion). | boolean | true when online |
| ring Solid accent ring with a clear gap. "seen" = story + seen. | "none" | "story" | "accent" | "seen" | "none" |
| seen Story watched: the ring cross-fades to a quiet hairline. | boolean | false |
| ringColors Ring colour override; the first entry is used as a solid colour. | string[] | sunset |
| ringSpin Broken ring that spins — a loading story (circle only). | boolean | false |
| verified Rosette seal with a check, bottom-right (bottom-left if a status dot is shown). | boolean | false |
| badge Notification count (99+), or true for a dot, top-right. | number | boolean | — |
| surface Colour behind the avatar; cut-outs and group borders use it. | string | theme background |
| accent Ring and verified seal colour. | string | theme accent |
| elevated Soft drop shadow under the face. | boolean | true for 72pt+ |
| onPress Makes it a button with spring press feedback. | () => void | — |
| haptics Light haptic tick on press. | boolean | true |
| AvatarGroup.max Avatars shown before the +N chip. | number | 4 |
| AvatarGroup.total Real total when larger than what you pass. | number | children count |
| AvatarGroup.overlap Overlap as a fraction of the size. | number | 0.28 |
| AvatarGroup.surface Colour of the separating borders — match the parent. | string | theme background |
| AvatarGroup.animated Staggered spring-in on mount. | boolean | true |
| AvatarGroup.onPressMore Makes the +N chip a button. | () => void | — |
| style Style for the avatar root; AvatarGroup applies it to its row. | StyleProp<ViewStyle> | — |
| className Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. | string | — |
Customization
You own the source file — tune appearance with props (no fork required for most tweaks). For brand-wide colours and radius, wrap your app in KitProvider; for one-off looks, use the style props below.
Design theme
Open Design theme on the live preview — accent, corner radius and font update every variant instantly (same as KitProvider in your app).
Variants
Use the variant chips on the preview to switch examples; each maps to a demo you can copy from the Code tab.
Style props
React Native style and typed slots like fieldStyle, plus optional root className when you use NativeWind or Uniwind (cnProps from kit).
- size
- "xs" | "sm" | "md" | "lg" | "xl" | number · default "md"24 / 32 / 40 / 56 / 72pt, or any number.
- ringColors
- string[] · default sunsetRing colour override; the first entry is used as a solid colour.
- surface
- string · default theme backgroundColour behind the avatar; cut-outs and group borders use it.
- accent
- string · default theme accentRing and verified seal colour.
- style
- StyleProp<ViewStyle>Style for the avatar root; AvatarGroup applies it to its row.
- className
- stringTailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides.
Map tokens from your design system on Bring your design system or read Theming for KitProvider and NativeWind / Uniwind setup.
Behaviour & accessibility
- Motion
- The photo fades in over the initials, a story ring cross-fades to a hairline once seen, and AvatarGroup springs its faces in with a stagger.
- Touch
- With onPress it becomes a button that springs down while pressed.
- Reduced motion
- The status pulse, ring spin, press squish and group stagger are skipped, and the seen cross-fade is instant.
- Haptics
- A light impact on press when onPress is set. Turn off with haptics={false}.
- Screen readers
- Read as an image (or a button when pressable) labelled with the name plus verified, status, notification and story details. A group reads its first names and "and N more".
Source
FAQ
How do I make a profile picture in React Native?
npx @expokit/cli@latest add avatar in your Expo or React Native project and it copies a ready-made profile picture into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.Does Avatar work in Expo Go?
react-native-svg, expo-haptics) are all included in Expo Go.How do I add Avatar to my Expo app?
npx @expokit/cli@latest add avatar in your project. The CLI copies the component's source into your app and installs react-native-svg, expo-haptics, so the code is yours to change.Is Avatar free?
Can I change how Avatar looks?
useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.