2.0.12 • Published 4 years ago

sylas-react-ui v2.0.12

Weekly downloads
27
License
MIT
Repository
github
Last release
4 years ago

sylas-react-ui

简体中文 / English

Introduce

A Light React UI components libary use typescript,function component and hooks api.

NPM JavaScript Style Guide

⚠️ This package is mainly for personal use. and it is in the early stage,So use in production environment is not for now.

Install

# npm
npm install --save sylas-react-ui
# or use yarn
yarn add sylas-react-ui

Example

See GitPage: https://pb0710.github.io/sylas-react-ui/

Usage

Make sure that you have at least version 16.8 of react and react-dom installed, or otherwise hooks won't work for you.

At first, add JSSBaseline to wrap your root App component up. JSSBaseline is required, it had provided default styles, themes, and jss inject first -- it is necessary for customize className overwirte.

import React from 'react'
import ReactDOM from 'react-dom'

import App from './App'
import { JSSBaseline } from 'sylas-react-ui'

ReactDOM.render(
  <React.StrictMode>
    <JSSBaseline>
      <App />
    </JSSBaseline>
  </React.StrictMode>,
  document.getElementById('root')
)

then, you can import some Components from sylas-react-ui

import React, { Component } from 'react'

import { Button } from 'sylas-react-ui'

function Example() {
  return <Button>Click here</Button>
}

components list

  • JSSBaseline
  • Button
  • Button.Icon
  • Collapse
  • Divider
  • Form
  • Form.Item
  • Input
  • Input.Textarea
  • Input.Group
  • Select
  • Select.Option
  • Switch
  • CheckBox
  • CheckBox.Group
  • Radio
  • Radio.Group
  • List
  • List.Item
  • Loading
  • Loading.Bounce
  • Loading.Line
  • Menu
  • Menu.Sub
  • Menu.Item
  • Tabs
  • Tabs.Panel
  • Paper
  • GroundGlass
  • Popup
  • Progress
  • Tag
  • TouchRipple

props api

It will be added later... Currently recommended to view the source code

hooks api

being used to function component and hooks(React > v16.8)

  • Form.useForm
  • Popup.usePopup
  • TouchRipple.useRipple

Github repositories and document

License

MIT © pb0710

2.0.12

4 years ago

2.0.11

4 years ago

2.0.10

5 years ago

2.0.9

5 years ago

2.0.8

5 years ago

2.0.7

5 years ago

2.0.5

5 years ago

2.0.6

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago