Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

react-user-card

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-user-card

A user card heavily inspired by Google's Material Design concept written with ReactJS.

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

react-user-card

Author: Brian Tomlinson darthlukan@gmail.com

Description

A user card heavily inspired by Google's Material Design written as a ReactJS component.

TODO

  • Package for NPM/Bower/whatever the JS users are using nowadays
  • Optional color params for title background and title font
  • Fix CSS inclusion, copying files from installation paths is janky
  • Better behavior on mobile screens, current media queries aren't really good enough
  • Cleanups

Screenshot

Imgur

Usage

The card supports optional css object parameters as shown in the example below:

    var React = require('react');
    var Card = React.createFactory(require('react-user-card'));

    var cardStl = {
        backgroundColor: '#fafafa',
        width: '30%',
        height: '20%',
        overflow: 'hidden',
        boxShadow: '.25px .25px 5px .25px',
        borderRadius: '2px 2px 2px 2px',
        zIndex: 5
    };

    var headerStl = {
        backgroundColor: '#901111', // red
        padding: '1%',
        color: '#eceff1',
        position: 'relative'
    };

    var contentStl = {
        color: 'rgb(0, 0, 0, 0.54)',
        padding: '2%'
    };


    React.render(
        Card(
            {
                userimg: 'http://www.gravatar.com/avatar/6a8561ee5706d17a4382a391720db523.png', 
                username: 'DarthLukan', 
                content: 'Dark Lord of the Sith.',
                cardStyle: cardStl,
                headerStyle: headerStl,
                contentStyle: contentStl
            }
        ), document.getElementById('app')
    );

Calling the card with the example code above will render a card that looks like:

Imgur

NOTE: Omitting the cardStyle, headerStyle, and contentStyle parameters will render the same as the one in the "Screenshots" section of the README.

License

MIT, see LICENSE file

Keywords

react-component

FAQs

Package last updated on 02 Nov 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts