Package Exports
- rsuite-color-picker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rsuite-color-picker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rsuite-color-picker
Package a color picker extension that can select color for rsuite.
Examples
DEMO
Installation
npm install rsuite-color-picker --save
or
yarn add rsuite-color-picker
Usage
import ColorPicker from 'rsuite-color-picker'
import 'rsuite-color-picker/lib/styles.less'
// import 'rsuite-color-picker/lib/styles.css'
const App = () => <ColorPicker />
ReactDOM.render(<App />, mountNode)
Props
Property | Type(Default) |
Description |
---|---|---|
disabled | boolean(false) |
disabled |
value | String/Object | value (Controlled) |
defaultValue | String/Object(#00bcd4) |
Default value |
disableAlpha | boolean(false) |
Remove alpha slider and options from picker |
onChange | Function | call every time the color is changed |
onChangeComplete | Function | call once a color change is complete |
see detail of 4 props in React Color
:
- color (value / defaultValue)
- disableAlpha (disableAlpha)
- onChange (onChange)
- onChangeComplete (onChangeComplete)
Less variable
- @color-picker-wrapper-padding: 5px;
- @color-picker-border-radius: 6px;
License
MIT licensed