JSPM

react-gradient-avatar

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7
  • Score
    100M100P100Q68531F
  • License MIT

A React component that generates a gradient avatar from a string.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-gradient-avatar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    react-gradient-avatar

    🌈 react-gradient-avatar is a React component that generates beautiful avatars.

    react-gradient-avatar

    Table of Contents

    Installation

    To install, you can use npm:

    $ npm i react-gradient-avatar
    $ yarn add react-gradient-avatar

    Examples

    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.

    Demo

    There is a demo hosted on my personal website.