You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package takes any color picker for you choice, And wraps it as a gradient picker.
This plays well with the package angle picker, which allows your users to play with the gradient angle.
What you need to know before installing?
This package is using hooks, which means you need to use React 16.8 or higher.
The gradient pickers color palette, Each palette color struct is described below
onPaletteChange
Function
undefined
Yes
The function to trigger upon palette change (Can be either from stop drag or color select).
paletteHeight
Number
32
No
The stops palette display area height
width
Number
400
No
Determines the width of the gradient picker
stopRemovalDrop
Number
50
No
Sets the Y stop drop removal offset, If the user will drag the color stop further than specified, Color will be removed
maxStops
Number
5
No
The max gradient picker palette length can have
minStops
Number
2
No
The min gradient picker palette length can have
colorPickerMode
String
static | popover
No
Determines the mode of the color picker picker component, by default static will always present otherwise will act as popover which will appear upon interaction.
direction
horizontal|vertical
horizontal
No
Determines the direction of the gradient picker.
|> Palette Color
Name
Type
Default Value
Required?
Description
color
String
``
Yes
The stop color, can be either hex of rgb format.
offset
Number
``
Yes
The stop color offset in percent.
opacity
Number
1
No
The stop color opacity.
active
Boolean
``
No
Rather the current color is active (selected) or not.