Last modified: 4/Oct/2024
Avatar
#Usage
import { Avatar } from '@kinsta/stratus'
const MyComponent = () => (
<>
<Avatar size="l" isRounded isKinstaStaff src="https://vignette.wikia.nocookie.net/shaniverse/images/7/71/Boba.jpg/revision/latest/scale-to-width-down/2000?cb=20200812025700" />
</>
)
#Props
The Avatar
components interface extends the
HTMLDivElement
interface. So you can use any props which documented there. Also, you can utilize all the React Synthetic events (on*
),
and props related to styling (className
, style
).
#src
string
Set the url of the image displayed as Avatar
#altText
string
Adds an alt-text to the image tag
#size
AvatarSize
Set the size of the Avatar
#isRounded
boolean
Set the border radius style of the input
#isKinstaStaff
boolean
Set whether to display a Kinsta icon at the bottom right side of the Avatar
#isLoading
boolean
Set whether to display a loading state
#Types
AvatarProps
: props of theAvatar
component processed by stratusAvatarInterface
:AvatarProps
extended byHTMLAttributes<HTMLDivElement>
Read more about types here