Skip to main content

Avatar

API documentation for the React Native Avatar component. Learn about the available props.

Import#

import { Avatar } from "@react-native-material/core";// orimport Avatar from "@react-native-material/core/Avatar";

Props#

interface AvatarProps {  label?: string | React.ReactElement | ((props: { color: string }) => React.ReactElement | null) | null;
  image?: ImageSourcePropType | React.ReactElement | ((props: { size: number }) => React.ReactElement | null) | null;
  icon?: React.ReactElement | ((props: { color: string; size: number }) => React.ReactElement | null) | null;
  size?: number;
  color?: PaletteColor;
  tintColor?: PaletteColor;
  initials?: boolean;
  uppercase?: boolean;
  autoColor?: boolean;
  style?: StyleProp<ViewStyle>;
  contentContainerStyle?: StyleProp<ViewStyle>;
  imageContainerStyle?: StyleProp<ViewStyle>;
  labelStyle?: StyleProp<TextStyle>;
  imageStyle?: StyleProp<ImageStyle>;}