Chip
Chip component
(code example)
info
This component extends TouchableOpacity, View props.
#
Usage<Chip label={'Chip'} onPress={() => console.log('pressed')}/>
#
API#
avatarPropsAvatar props object
AvatarProps
#
backgroundColorBackground color
string
#
badgePropsBadge props object
BadgeProps
#
borderRadiusBorder radius
number
#
containerStyleComponent's container style
ViewStyle
#
dismissColorDismiss color
string
#
dismissContainerStyleDismiss container style
ImageStyle
#
dismissIconDismiss asset
ImageSourcePropType
#
dismissIconStyleDismiss style
ImageStyle
#
iconPropsAdditional icon props
Omit<ImageProps, 'source'>
#
iconSourceLeft icon's source
ImageSourcePropType
#
iconStyleIcon style
ImageStyle
#
labelMain Chip text
string
#
labelStyleLabel's style
TextStyle
#
leftElementLeft custom element
JSX.Element
#
onDismissAdds a dismiss button and serves as its callback
(props: any) => void
#
onPressOn Chip press callback
(props: any) => void
#
resetSpacingsDisables all internal elements default spacings. Helps reach a custom design
boolean
#
rightElementRight custom element
JSX.Element
#
rightIconSourceRight icon's source
ImageSourcePropType
#
sizeChip's size. Number or a width and height object
number | {{width: number, height: number}}
#
testIDThe test id for e2e tests
string
#
useCounterDisplay badge as counter (no background)
boolean
#
useSizeAsMinimumUses size as minWidth and minHeight
boolean