Color configuration panel for react.
npm install -S afeiship/react-color-configuration
All used options.
property | type | description |
---|---|---|
className | string | Extend className for css |
value | array | Displayed current colors |
current | string | Current selected color |
min | number | Min limit colors |
max | number | Max limit colors |
onValidate | func | When warning |
onChange | func | Any change |
- singular mode(multiple=false)
property | type | description |
---|---|---|
className | string | Extend className for css |
value | array | Displayed current colors |
current | string | Current selected color |
onChange | func | Any change |
- plural mode(multiple=true)
property | type | description |
---|---|---|
className | string | Extend className for css |
value | array | Displayed current colors |
min | number | Min limit colors |
max | number | Max limit colors |
onValidate | func | When warning |
onChange | func | Any change |
- import css
@import "~react-color-configuration/style.scss";
// customize your styles:
$react-color-configuration-options: ()
- import js
import React from 'react';
import ReactDOM from 'react-dom';
import ReactColorConfiguration from 'react-color-configuration';
// your app:
class App extends React.Component{
render(){
return (
<ReactColorConfiguration />
)
}
}
// render to dom:
ReactDOM.render(<App/>, document.getElementById('app'));