Skip to content

OrAvatar

A component usually used to visually represent a user.

Usage

Different ideas can be created by mixing and matching the prop values

Lisa Simpson avatar

Lisa Simpson

L S

Lisa Simpson

L S

Lisa Simpson avatar

Lisa Simpson

html
<or-avatar 
    img="https://media.giphy.com/media/K3Sbp8fOgKye4/giphy.gif"
    :dimension="90"
    :rounded="true"
    text="Lisa Simpson"
/>
<or-avatar 
    img="https://media.giphy.com/media/K3Sbp8fOgKye4/giphy.gif"
    :dimension="90"
    :rounded="true"
    text="Lisa Simpson"
/>

NOTE: The component should either have either have a valid url to the image in the img prop or at least a some text in the text prop. This is because the component will usually fallback to create initials off the text prop if the image URL isn't valid.

Props

PropDefaultTypeValuesDescription
imgstringURL to image
textstringText to place with image
dimension40numbersize(height, width) of the image
roundedfalsebooleantrue, falseMake image circlar
cornerRadiussmstring"sm", "md", "lg"Number representing corner roundness
textPositionbottomstringtop, right, bottom, leftPosition of the text to the image

D2B ___ Chidi Ikeoha