Color picker
Jira Color Picker Component
yarn add @atlaskit/color-picker
4.0.2
Patch Changes
-
#120533
f1bec731e278f
- Adds asideEffects
field to ensure this package does not have Compiled styles tree-shaken in the future to avoid an accidental regression.This is related to https://community.developer.atlassian.com/t/rfc-73-migrating-our-components-to-compiled-css-in-js/85953
Note: This component is designed for internal Atlassian development.
External contributors will be able to use this component but will not be able to submit issues.
Note: This component is currently in developer preview.
Please experiment with and test this package, but be aware that the API may change at any time. Use at your own risk, preferably not in production.
This component allows to pick colors from color palette.
Usage
import ColorPicker from '@atlaskit/color-picker';
Basic Usage
Color picker with multiple columns palette
Color picker props
label
string
color picker button label
triggerId
string
trigger id for accessability labelling
palette
arrayType
required
list of available colors
Arraylabel string required value string required
selectedColor
string
selected color
cols
number
maximum column length
checkMarkColor
string
color of checkmark on selected color
popperProps
import
props for react-popper
undefined.PopupSelectProps['popperProps']
onChange
function
required
onChange handler
function value, analyticsEvent => undefined
createAnalyticsEvent
any
You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next.
selectedColourSwatchSize
union
swatch button size
One of "small", "default"
showDefaultSwatchColor
boolean
swatch button default color
isDisabledSelectedSwatch
boolean
diasble swatch button
onMenuOpen
function
onMenuOpen handler
() => undefined
variant
union
Display filled or outline variant of the color
One of "fill", "outline"