Customize react-color's SketchPicker

837 Views Asked by At

I'm using react-color's SketchPicker and I only want to keep the section where I can pick the colors as the below image shows

enter image description here

I'm currently using these styles

pickerStyles = {
        default: {
            picker: {
                width: "150px",
                height: "200px",
                padding: "0",
                borderRadius: "0",
            }
        }
    };
<SketchPicker color="#FFFFFF" styles={this.pickerStyles} />

how can I add a display: none to the below elements of the color picker ? Thank you

1

There are 1 best solutions below

0
arrmani88 On

As you can see in their docs you can add the following props to hide the opacity slider and the predefined colors suggestions:

<SketchPicker
    presetColors={[]}
    disableAlpha
    [...]
/>