import { Avatar } from '@smartacteam/react-native-ui';
<Avatar initials="AB" size_md /> <Avatar size_md image={require('...path/to/image.jpg')} /> <Avatar initials="CR" size_lg badge={...} badgeVerticalPosition="bottom" badgeHorizontalPosition="left" />
| Name | Type | Required | Description |
|---|---|---|---|
initials | string | No | Fallback initials shown when image is not provided. |
image | ImageSourcePropType | No | Image to be used in the avatar. |
badgeVerticalPosition | 'top' | 'bottom' | No | Vertical placement of the badge. Default is 'top'. |
badgeHorizontalPosition | 'left' | 'right' | No | Horizontal placement of the badge. Default is 'right'. |
badge | React.ReactNode | No | A React node rendered as a badge overlay. |
size_* | boolean | No | One of the size keys, like size_sm, size_md, size_lg, etc. |
| (…) | (Inherited) | Props from BaseSmacStyling, ViewProps. |
Size is inferred by any
size_*boolean passed to the component. If no size is passed, it defaults tosize_md.
See
BaseSmacStyling,BaseSmacTextStyling, and React Native View Props for inherited options.