Forked react-toolbox with some fixes
 
 
 
 
Go to file
Javi Velasco 926cf9506b README initial version 2015-11-01 17:52:07 +01:00
components Merge pull request #26 from ideal-react/dev 2015-11-01 16:39:59 +01:00
docs Include example of readme for landing 2015-11-01 22:57:49 +07:00
spec add app_bar to spec 2015-10-30 22:38:15 +08:00
.babelrc use react-transform 2015-10-29 13:33:21 +08:00
.csscomb.json Complete and reorganize first approach for documentation pages 2015-10-28 01:49:22 +01:00
.editorconfig Migrate button, ripple and font icon styles to sass and add sass tooling 2015-10-02 17:39:26 +02:00
.eslintignore use react-transform 2015-10-29 13:33:21 +08:00
.eslintrc use react-transform 2015-10-29 13:33:21 +08:00
.gitignore update webpack dev, test and build & update eslint rule 2015-10-23 16:11:40 +08:00
.nvmrc Fix some errors and change opinionated eslint 2015-10-23 18:30:37 +02:00
.scss-lint.yml Complete and reorganize first approach for documentation pages 2015-10-28 01:49:22 +01:00
.travis.yml Update travis node to 4.2.1 2015-10-26 09:37:55 +01:00
CNAME Include CNAME for react-toolbox.com 2015-10-31 09:30:09 +07:00
LICENSE README initial version 2015-11-01 17:52:07 +01:00
README.md README initial version 2015-11-01 17:52:07 +01:00
karma.conf.js Fix some errors and change opinionated eslint 2015-10-23 18:30:37 +02:00
package.json Some fixes and include extract text webpack plugin 2015-10-29 13:40:12 +01:00
server.js add UV_THREADPOOL_SIZE 2015-11-01 21:11:58 +08:00
tests.webpack.js Fix some errors and change opinionated eslint 2015-10-23 18:30:37 +02:00
webpack.config.development.js add sass sourcemap in dev 2015-10-30 11:51:29 +08:00
webpack.config.test.js use react-transform 2015-10-29 13:33:21 +08:00

README.md

#React-Toolbox

Build Status ![Gitter](https://badges.gitter.im/Join Chat.svg)

Current version: 0.7.29

React Toolbox is a set of React components that implement Google's Material Design specification. It's powered by CSS Modules and integrates harmfully with your Webpack workflow. You can take a tour through our documentation website and try the components live!

Installation

React Toolbox can be installed as an npm package;

npm install --save react-toolbox

Usage

Although there are other ways to use React Toolbox, the recommended way is to create a Webpack workflow with Babel Loader, CSS Loader and SASS Loader. A good starting point is React Hot Webpack Boilerplate.

Once you have the workflow ready, you can just require and use the components:

import React from 'react';
import Button from 'react-toolbox/button';

const Button = () => (
  <Button label="Hello world" kind="raised" accent />
);

export default Button;

The previous code creates a React button component based on React toolbox button. It's important to notice that requiring a module from the exposed root of the package will try to import the ES6 JSX and SASS of the component. If you want to still use CSS Modules but avoiding Babel and SASS you will need to require from react-toolbox/lib.

We encourage you to work with webpack but if you want to use React Toolbox in an old fashioned way you must generate a build with all the css and javascript and include it in your index.html. Then you can use the components exposed in the window object.

Customization

Since React Toolbox styles are written in CSS it's pretty easy to customize your components. We have several ways:

Via React Toolbox Loader (coming soon)

Thanks to the power of SASS, all components in React Toolbox are configured from a variables file. The best way to customize your build is to create a custom configuration SASS file with the variables you want to modify during the build process.

With react-toolbox-loader so you can tell webpack where your configuration file is. It will prepend your configuration to each build belonging to RT components resulting in your customized CSS. More on this soon.

Via className property

Generally each component will have a className prop so you can tell the class name you want to keep in the root node of the resulting markup. All markup is style with the lowest specificity level so you can just nest one level in your CSS and the result will be applied. Consider this example:

const CustomButton = () => (
  <Button className='customized' label='Custom button' />
);

If you browse the resulting markup you will see data attributes like data-role="label" so you can avoid styling directly tag names. You can now write your CSS:

.customized > [data-role="label"] {
  color: green;
  font-weight: bold;
}

Authors and Contributors

The project is being initially developed and maintained by Javier Velasco and Javier Jiménez and the contribution is just getting warm.

We want to create reference components so any contribution is very welcome.

License

This project is licensed under the terms of the MIT license.