Socket
Socket
Sign inDemoInstall

aptos-avatars-react

Package Overview
Dependencies
48
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aptos-avatars-react


Version published
Maintainers
1
Created

Readme

Source

Aptos Avatars

Aptos Avatars React

Implementation of the Aptos Avatars shape library for React applications.

Installation

pnpm add aptos-avatars-react

How to Use

The avatar compoennt can be imported as a React component which renders an inline SVG element. If you choose to use a single shape, you can import the shape avatars directly. The package is built with ES Modules so the rest of the package will be tree-shaken out of your bundle.

import { AptosAvatar, Shape2 } from "aptos-avatars-react";

// Usage
const App = () => {
  return (
    <div>
      <AptosAvatar value="0xd2cf...cff23" border shadow />
      <Shape2 value="0xd2cf...dff23" />
    </div>
  );
};

export default App;

Props

nametypedefaultdescription
value*stringrequiredUnique identifier for the user (e.g., address or Aptos Name) to randomly generate a shape and color
sizenumber32Size of the icon
shadowbooleanfalseToggle the border
borderbooleanfalseToggle the shadow
borderSizenumber2Width of the border, in pixels
borderColorstring#fffColor of the border
radiusnumbersizeBorder radius of the avatar, in pixels
displayValuestringN/AValue to be displayed on the avatar instead of value. This can be a name instead of an identifier
style"character" | "shape""character"Style of the avatar (either "character" or "shape")

FAQs

Last updated on 11 Sep 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc