2.1.2 • Published 2 years ago

aptos-avatars-react-native v2.1.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

Aptos Avatars React Native

Implementation of the Aptos Avatars shape library for React Native applications.

Installation

pnpm add aptos-avatars-react-native

How to Use

The avatar compoennt can be imported as a React Native 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-native";

// 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")
2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago