React Usage
To use @avatar-generator/react
in your React application, you can follow these examples to create avatars with React components.
Usage Example
Here is an example of how to use the avatar component in your React project:
Summary
In this guide, you learned how to use the @avatar-generator/react
package in your React project. The steps include:
- Installing
@avatar-generator/react
. - Importing the
Avatar
component from the package. - Using the
Avatar
component in your app, passing in properties likename
,backgroundColor
,textColor
,fontSize
, andshape
to customize the avatar.
By following these steps, you can easily integrate customizable avatars into your React application.
This guide demonstrates how to use the React component from @avatar-generator/react
to easily generate avatars in your React app.