Giter VIP home page Giter VIP logo

react-initial's Introduction

react-initial

React Initial

Simple react component to make Gmail like text avatars for profile pictures.

npm version License npm

Usage

import React, { Component } from 'react'
import { Initial } from 'react-initial'

export default class MyComponent extends Component {
  render () {
    return (
      <Initial
        name='Bruno Carvalho de Araujo'
      />
    )
  }
}

Props

The Initial component takes a couple of props that you can use to customize its behaviour:

Name Type Description Default
name string Name of the user which the profile picture should be generated Name
height number Height of the picture 100
width number Width of the picture 100
charCount number Number of characherts to be shown in the picture. 1
textColor string Color of the text #ffffff
fontSize number Font size of the character(s) 60
fontWeight number Font weight of the character(s) 400
radius number Rounded corners 0
seed number Number to randomize the background color 0
color string Background color of the profile picture that should be generated null
useWords boolean number of characters while splitting the words over spaces null

Compatibility

  • Chrome
  • Firefox
  • Opera 9+
  • Safari 3.2+
  • iOS Safari 3.2+
  • Android Browser 3+

References to create project

react-initial's People

Contributors

a-haba avatar brunocarvalhodearaujo avatar dependabot[bot] avatar varevarao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-initial's Issues

⚠️ Greenkeeper is no longer available for new installations

Hello!

Greenkeeper is no longer available for new installations.

The service will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020. Find out more at greenkeeper.io.

If this is your only Greenkeeper installation, you can just sign up for Snyk directly, it’s free for Open Source even has free features for private projects as well.

Nevertheless, thanks for your interest in Greenkeeper! We’re sure your repositories will find a good home at Snyk β˜€οΈπŸ‘πŸ’œ

All the best from everyone at Greenkeeper! πŸ‘‹πŸ€–πŸŒ΄

Does not use second name

When the name is fed a first and second (last) name, and the charCount is set to 2, the first two letters of the first name are used. That is not what one normally considers to be the initials.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.