npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

reactor-ui

v0.1.1

Published

Reactor UI Kit

Downloads

23

Readme

Reactor UI

Build Status

** This is work in progress **

Reactor UI is a reusable UI kit written in React.

Note that this is very much on its initial development phase, a work in progress.

Table of Contents

  1. Motivation
  2. Usage
  3. Buttons
  4. SideNav

Motivation

The aim for this project is to be used as a base for developers creating custom ui kits in their projects.

Usage

npm install --save reactor-ui

To load the css, you need to have css loader within your build. If you are using webpack then you can use css-loader

npm install --save-dev css-loader

Then add this on your webpack config under the loaders section...

    ...
    loaders [
        ...
        { test: /\.css$/, loader: "style-loader!css-loader" }
    ]

Components

Buttons

    
    import { Btn } from 'reactor-ui/buttons';

    //load the css before loading, or can be done from your projects
    //entry point
    import 'reactor-ui/css/buttons.css';

    const Buttons = ({onClick}) => (
        <span>
            <Btn onClick={onClick} text=' Reactor UI '/>
            <Btn scheme='primary' onClick={onClick} text=' Reactor UI '/>
            <Btn scheme='success' onClick={onClick} text=' Reactor UI '/>
            <Btn scheme='warning' onClick={onClick} text=' Reactor UI '/>
            <Btn scheme='danger' onClick={onClick} text=' Reactor UI '/>
            <Btn disabled={true} text=' Reactor UI '/>
        </span>
    );

Override Styling

To change the styles, just override the css and load your overrides


    //load the css before loading
    import 'reactor-ui/css/buttons.css';
    import 'myproject/css/project.css';

/** project.css, override primary color **/

.rui-btn-primary {
  background: blue;
  color: #FFFFFF;
}

SideNav

SideNav is a vertical navigation. Do note that its a stateless component so you would need to provide it all selection details and such from within a stateful component

    import React from 'react';

    import { SideNav, NavItem, NavGroup } from 'reactor-ui/sidenav';

    //import styles here or can be from projects entry point
    import 'reactor-ui/css/sidenav.css';

    const SideMenu extends React.Component {

        constructor() {
            this.state = { };
        }

        onNavClick = (id) => {
            this.setState( { selectedId: id });
        }
        render() {
            return (
                <div style={{ marginRight: 4, width: 240 }}>
                    <SideNav onClick={ this.onNavClick } selectedId={this.selectedId}>
                        <NavItem id={'1'} text='Dashboard' icon='fa fa-dashboard'/>,
                        <NavItem id={'2'} text='Channels' icon='fa fa-exchange'/>,
                        <NavGroup id={'3'} text='Products' icon='fa fa-cube'>
                            <NavItem id={'3.1'} text='Inventory Levels' icon='fa fa-bar-chart'/>
                            <NavItem id={'3.2'} text='Sales Report' icon='fa fa-dollar'/>
                        </NavGroup>                        
                        <NavItem id={'4'} text='Inventory' icon='fa fa-cubes'/>
                    </SideNav>  
                </div>
            );                 
        }    

Styling

To change the styles, just override the css and load your overrides


    //load the css before loading
    import 'reactor-ui/css/sidenav.css';
    import 'myproject/css/project.css';

/** project.css, override sidenav style **/

.rui-snav-cdark {
  background: #2c3e50;
  color: #F5F7FA;
}

.rui-snav-item-green:hover {
  background: #16a085;
}

Development

  • npm install -g webpack webpack-dev-server
  • git clone https://github.com/wmira/reactor-ui.git
  • cd reactor-ui
  • npm install

Running examples and development

You need to run

npm run dev

but you need to pass extra arguments specifying the entry point for webpack. To run the sidenav.js example

npm run dev -- examples/sidenav.js

do the same for other examples.

Testing

npm run test

Contributing