🌈 react-gradient-avatar is a React component that generates beautiful avatars.
To install, you can use npm:
$ npm i react-gradient-avatar
$ yarn add react-gradient-avatar
Here is a simple example of react-gradient-avatar
:
import React from "react";
import ReactDOM from "react-dom";
import GradientAvatar from "react-gradient-avatar";
const App = () => {
// ...
return (
<div>
<GradientAvatar
size="large"
name="Brandon Sueur"
gradient={{
from: "#FDC830",
to: "#F37335",
}}
/>
</div>
);
}
ReactDOM.render(<App/>, appElement);
You can find the example in the examples
directory, which you can run in a
local development server using npm start
or yarn start
.
There is a demo hosted on my personal website.