Skip to content

Profile Picture

Displays a round image of a specified size for a user's profile picture.

See all the examples and details in the Storybook.

Usage

tsx
import { ProfilePic } from "@samgl/graffiti-ui";

const MyProfilePic = () => {
  return (
    <ProfilePic
      src="https://picsum.photos/id/237/128"
      alt="Profile Picture"
      $size="64px"
    />
  );
};

Props

PropTypeDefaultOptionalDescription
srcstringThe source of the image.
$sizestringThe size of the image passed to the CSS.
altstringThe alt text of the image.
classNamestringThe class name of the component, generally used when extending the component with a styled component.