Skip to content

cd-fe/react-component

Repository files navigation

UI Library for React

todolist

  • Input & Textarea Done
  • Validate
  • Pagination Done
  • Table Done
  • Checkbox Done
  • CheckboxGroup Done
  • Radio Done
  • RadioGroup Done
  • Select Done
  • Tree Done
  • Datepicker Done
  • Message
  • Form Done
  • Dialog Done
  • Upload Done
  • Tab Done
  • Accordion
  • AutoComplete
  • Progress Done
  • Tooltip Done
  • Slider Done
  • Button Done
  • Spinner Done

usage

First, npm install react-component-lib

Then:

var RUI = require('react-component-lib');

// or

import RUI, {Button, Input} from 'react-component-lib';

whatever require or import, RUI will patch a global variable named: RUI, such as window.RUI

Note: Make sure you import React and ReactDOM before RUI

In my case, I use <script src="react+reactdom.js"></script> to import React before RUI, React is so big, I expect to split it into a common file, and Browser will cache it

how to develop

npm install
// Mac & Linux
npm run example
// Windows
npm run example-win

browser example/index.html