Coder Social home page Coder Social logo

recoil's Introduction

Recoil

npm version

Rapidly create React websites.

Alt text

Recoil is a react powered UI framework.

The main goal of Recoil was to build a front end framework that allows developers to rapidly create mobile first web applications

NPM Module

npm install react-recoil --save

Then include the following CSS files in your HTML:

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,500,700,900" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.2/css/font-awesome.css" />
<link async href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

In order to add the styles, you'll need to include in one file of your project

CSS Styles

import 'react-recoil/dist/styles.css';

Preffered Method - LESS Styles

import 'react-recoil/src/index.less';

You'll need to set up your project to build recoil. Assuming you're using Webpack, first install

npm install css-loader less less-loader style-loader --save-dev

Then in your Webpack configuration, include in the loaders array

{
    test: /\.less$/,
    loader: 'style-loader!css-loader!less-loader'
}

Importing Components

First you'll need to include the main Recoil component in the root view of your project.

The root Recoil component handles suff like detecting user agent or toggling nightmode.

For example if you use react-router.

import { Recoil } from 'react-recoil';

// On Render
// the onDevice and nightmode props are optional on Recoil Component
   <Router>
        <Recoil onDevice={this.onDevice} nightmode={isNightmode} {...styles}>
            // View and other Recoil Components here
        </Recoil>
    </Router>

Now, on your project you can destructure the components you want.

import { Toolbar, Button } from 'react-recoil';

An example of how to use them in your app.

<Toolbar spacing block>
    <Button icon="home" />
    <Button icon="user">
        Users
    </Button>
</Toolbar>

Documentation

First run these commands

git clone https://github.com/jisaac89/recoil.git
cd recoil
npm install
npm run start:dev

Will run on http://localhost:3000/

Todos

  • Write Tests

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.