Free
Pro

Avatar

An avatar specifically refers to a character that represents an online user. Base theme present avatar in two shapes.

free

Playground

shape
status
size

HTML

<ply-avatar avatarUrl="assets/images/avatar1.jpeg" shape="circle" status="active" size="lg" initials="BU">Avatar</ply-avatar>

Default Avatar

Default Avatar examples below.

Avatar Shape

By default avatar component is with square shape with rounded borders. To make it circular use attribute shape="circle".

Avatar Status

Use attribute status="..." to define user status. Base theme supports two statuses, "active" and "inactive".

Avatar Sizes

Base theme Avatar supports 5 sizes. Use size="" with supported "xs", "sm", "md", "lg" or "xl" to define avatar size. Or you can define the size manually by using tailwind class for width and height.

Installation

Run the following command to add this component to your project:

bash

npx ply-ui-cli add avatar

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.

bash

npx -y ply-ui-mcp

Ply provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx ply-ui-cli add avatar
// Paths are relative to aliases.components (default: src/app/components)
import { AvatarComponent } from './avatar/avatar.component';

@Component({
  selector: 'app-your-component',
  imports: [
    AvatarComponent
  ],
  template: `...`
})
export class YourComponent {}

API for avatar — generated from JSDoc in the library source.

API reference for avatar
APIMemberTypeDefaultDescription
ply-avatarclassstring''Additional host CSS classes (merged via cn()).
ply-avataravatarUrlstring | undefined''
ply-avatarshapeAvatarShape'square'
ply-avatarstatusAvatarStatus | undefinedundefined
ply-avatarsizeAvatarSize'md'
ply-avatarinitialsstring''