Documentation
Components
Avatar

Avatar

The Avatar component is used to display a user's profile picture or initials in a visually appealing manner. It supports various sizes and shapes, including circular and square variants.

Installation

Install the package

npm i @start-base/start-ui

Add the styles

To use the React form elements styles in a Next.js project, import the styles in your layout.tsx file.

app/layout.tsx
import "@start-base/start-ui/styles.css";

Import the component

import Avatar from '@start-base/start-ui/Avatar';

Usages

Medium Circular Avatar

avatar

Avatar Without Image

SU

Square Large Avatar

SU

Large Avatar with Image

avatar

Avatar with Default Image

avatar

Small Circular Avatar

SU

Avatar Without Props

SU

Avatar With Next Image

avatar

API

NameTypeDefaultDescription
charsstring"SU"Chars of the Avatar
sizesmall medium largemediumSize of the Avatar
variantcircular squarecircularVariant of the Avatar
picturestring""Picture of the Avatar
classNamestring""ClassName of the Avatar
defaultPicturestring""Default Picture of the Avatar
ComponentElementType"img"Custom component to replace the <img> element. Can be used with Next Image.
componentPropsobject{}Properties for Component element.