Socket
Socket
Sign inDemoInstall

@washingtonpost/wpds-avatar

Package Overview
Dependencies
Maintainers
239
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@washingtonpost/wpds-avatar

WPDS Avatar


Version published
Weekly downloads
541
increased by61.98%
Maintainers
239
Weekly downloads
 
Created
Source

Avatar

Using next/image

Some important things to note when using next/image with the wpds avatar component.

  • The next/image expects a pixel value to be passed into the height and width props. You can find the token to pixel mappings in the size documentation.
  • In order for the image to fit correctly in the container you need to specify layout="fixed".
  • If you're having issues, double check that you're passing in a loader
import { Avatar } from "@washingtonpost/wpds-ui-kit";

const myLoader = ({ src }) => {
  return `${src}`;
};

function Component() {
  	<Avatar size="200">
      <img
        src="https://i.pravatar.cc/300/300"
        alt="An avatar is an atomic component that represents an individual’s identity through a circular photo."
      />
    </Avatar>
    <Avatar>
      <Image
        loader={myLoader}
        src="https://i.pravatar.cc/300/300"
        width="32" //pixel equivalent of 200 token
        height="32" //pixel equivalent of 200 token
        layout="fixed"
        alt="An avatar is an atomic component that represents an individual’s identity through a circular photo."
      />
    </Avatar>
}

FAQs

Package last updated on 17 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc