ColorSwatch
A color swatch component
(code example)
Usageβ
Live Editor
<ColorSwatch color={Colors.red30} selected={true} onPress={() => console.log('pressed')}/>
Result
Loading...
APIβ
animatedβ
Is first render should be animated
boolean
colorβ
The color of the ColorSwatch
string
indexβ
The index of the Swatch if in array
number
onPressβ
Callback from press event
(value: string, colorInfo: ColorInfo) => void
selectedβ
Is the initial state is selected
boolean
sizeβ
Color Swatch size
number
styleβ
Component's style
ViewStyle
unavailableβ
Is the initial state is unavailable
boolean
valueβ
Must be different than other ColorSwatches in the same groupβ
The identifier value of the ColorSwatch in a ColorSwatch palette
string