npm install --save @idui/react-avatar
yarn add @idui/react-avatar
See props in Docs
import React from 'react'
import Avatar from '@idui/react-avatar'
function Example({ user }) {
return <Avatar
src={user.avatar}
defaultSrc="default.png"
/>
}
import React from 'react'
import Avatar from '@idui/react-avatar'
function Example({ user }) {
return <Avatar
src={user.avatar}
initials={`${user.firstName[0]}${user.lastName[0]}`}
color="orangered"
/>
}
See more details in storybook
MIT © [email protected]