Avatar
Last update: 2.1.0 (30/01/2024)
Usage
import { Avatar } from "@valence-ui/core";
function MyComponent() {
return (
<Avatar
src="https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=720&q=80"
alt="A nice avatar!"
/>
)
}Overriding default props
import { Avatar } from "@valence-ui/core";
import { IconUserCircle } from "@tabler/icons-react";
function MyComponent() {
return (
<Avatar
src="https://images.unsplash.com/photo-1419242902214-272b3f66ee7a?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=720&q=80"
alt="A nice avatar!"
square={false}
radius="sm"
placeholder={<IconUserCircle />}
/>
)
}Setting a fill variant
Customizing the placeholder
Props
Property
Type
Description
Changelog
Last updated