Chip
Chip component
(code example)
This component extends TouchableOpacity, View props.
Usageβ
<Chip label={'Chip'} onPress={() => console.log('pressed')}/>
APIβ
avatarPropsβ
Avatar props object
AvatarProps
backgroundColorβ
Background color
string
badgePropsβ
Badge props object
BadgeProps
borderRadiusβ
Border radius
number
containerStyleβ
Component's container style
ViewStyle
dismissColorβ
Dismiss color
string
dismissContainerStyleβ
Dismiss container style
ImageStyle
dismissIconβ
Dismiss asset
ImageSourcePropType
dismissIconStyleβ
Dismiss style
ImageStyle
iconPropsβ
Additional icon props
Omit<ImageProps, 'source'>
iconSourceβ
Left icon's source
ImageSourcePropType
iconStyleβ
Icon style
ImageStyle
labelβ
Main Chip text
string
labelStyleβ
Label's style
TextStyle
leftElementβ
Left custom element
JSX.Element
onDismissβ
Adds a dismiss button and serves as its callback
(props: any) => void
onPressβ
On Chip press callback
(props: any) => void
resetSpacingsβ
Disables all internal elements default spacings. Helps reach a custom design
boolean
rightElementβ
Right custom element
JSX.Element
rightIconSourceβ
Right icon's source
ImageSourcePropType
sizeβ
Chip's size. Number or a width and height object
number | {{width: number, height: number}}
testIDβ
The test id for e2e tests
string
useCounterβ
Display badge as counter (no background)
boolean
useSizeAsMinimumβ
Uses size as minWidth and minHeight
boolean