Giter Club home page Giter Club logo

element-react's Introduction

Element React

Element was initially written in Vue, which has many elegant UI components, but we also love React, so we forked it for the React community.

Getting Started

Install

npm install element-react --save

Before the building, you need a style theme, here we recommend you to pick up element-theme-default.

npm install element-theme-default --save

Usage

We are die hard fans of ECMAScript 6, so we recommend you writing code in modern javascript.

import { Button } from 'element-react';

Also we provide an advanced way to tree shaking the code with Rollup.js and Webpack 2

import { Button } from 'element-react/next';

Config

With webpack, you need additional loaders to build with element-react.

const webpack = require('webpack');

module.exports = {
  entry: {
    src: 'path/to/src'
  },
  output: {
    path: 'path/to/output'
    publicPath: '/public',
    chunkFilename: '[chunkhash:12].js',
    filename: '[chunkhash:12].js'
  },
  plugins: [
    new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
    new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false
      }
    })
  ],
  resolve: {
    extensions: ['.js', '.jsx']
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: 'babel-loader',
        include: ['path/to/src']
      },
      {
        test: /\.css$/,
        loaders: ['style-loader', 'css-loader']
      },
      {
        test: /\.(ttf|eot|svg|woff|woff2)(\?.+)?$/,
        loader: 'file-loader?name=[hash:12].[ext]'
      }
    ]
  }
}

Contributing

Please make sure to read the Contributing Guide before making a pull request.

Acknowledgments

  • @doxiaodong for adding typescript ambient declarations.
  • @cuining for building the live code editor.

Credits

  • Element Desktop UI elements for Vue.js 2.0.

License

MIT

element-react's People

Contributors

e1emeb0t avatar sam019 avatar inter-action avatar martin0809 avatar hazel54 avatar lujingfeng avatar rlog avatar loadchange avatar matth3wga0 avatar hopelyn avatar liiiku avatar dujiaolong avatar september-9 avatar liang3472 avatar jackyzm avatar alexvagrant avatar emiya0306 avatar adpearance avatar f48vj avatar mytharcher avatar lihongyan11 avatar cuining avatar yexiaosong avatar adnanoner avatar kadobot avatar clumsyme avatar isaacluo avatar ingver avatar j4dream avatar alihanberk avatar

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.