Default Value

By default, the ColorPicker value is not set and the popup is hidden.

To set the initial value that is rendered by the ColorPicker, set the defaultValue property. As a result, the component displays a value upon its initial render while remaining in an uncontrolled state.

class App extends React.Component {
    defaultValue = 'rgba(237, 126, 50, 1)';

    render() {
        return(
            <div className="row">
                <div className="col-xs-12 col-md-12 example-col">
                    <p>ColorPicker with default value</p>
                    <ColorPicker
                        defaultValue={this.defaultValue}
                    />
                </div>
            </div>
        )
    }
}
ReactDOM.render(
    <App />,
    document.querySelector('my-app')
);