@asphalt-react/avatar

1.16.0 • Public • Published

Avatar

Avatar component is used to represent people or objects. It can also be used to provide additional visual information about a user. It supports images, SVGs and lettered initials. Avatar renders its background color if image size is smaller.

Avatar is compatible with raster images, SVG or @asphalt-react/iconpack

Usage

import Avatar from "@asphalt-react/avatar"

function App() {
  return (
    <Avatar>
      <img
        src="images/avatar.png"
        alt="dummy avatar"
        aria-label="dummy avatar"
      />
    </Avatar>
  )
}

Props

children

Image or letters to display

type required default
node true N/A

size

Renders the Avatar with the provided size. accepts xxs, xs, s, m, l sizes.

type required default
enum false "m"

Package Sidebar

Install

npm i @asphalt-react/avatar

Weekly Downloads

207

Version

1.16.0

License

UNLICENSED

Unpacked Size

25.2 kB

Total Files

9

Last publish

Collaborators

  • shripriya.bhat
  • dawn29
  • itsjay26
  • sayantan1211
  • abhinav.preetu