Skip to main content

Avatar

Reusable avatar component that renders a Starknet ID profile picture when provided; otherwise falls back to a blo-generated blockie for the given address.

Importโ€‹

import { Avatar } from "~~/components/scaffold-stark";

Usageโ€‹

<Avatar address="0x034aA3F359A9D614239015126635CE7732c18fDF3" size={30} profilePicture={profile?.profilePicture} />

Propsโ€‹

PropTypeDefault ValueDescription
addressstringundefinedThe address used to render a fallback blockie if no profile picture is available. Must be in 0x___ format.
sizenumberundefinedWidth and Height in pixels (square).
profilePicturestringundefinedStarknet ID profile picture URL. If present, it will be rendered.
className (opt.)stringundefinedExtra class names applied to the rendered image.