Skip to main content
Version: Next

Chip

The Chips can be used to display entities in small blocks.

Import

import { Chip } from '@tra-tech/react-native-kitra';

Usage

import { Chip } from '@tra-tech/react-native-kitra';
import { View } from 'react-native';

const App = () => (
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center'}}>
<Chip
icon={{ iconName: 'penguin', iconPosition: 'left', iconType: 'material-community' }}
label="Small"
size='large'
onChange={e => console.log(e)}
colorStyle={{ backgroundColor: 'tomato', selectBackgroundColor: 'white', selectTitleColor: 'tomato', titleColor: 'white' }}
/>
</View>
);

export default App;

Props

Prop nameTypeRequiredDescription
labelstringNoText of chip.
valuebooleanNoStatus of chip. Default value: 'false'
labelStyleStyleProp<TextStyle>NoAdditional styles to apply to the chip.
styleStyleProp<ViewStyle>NoAdditional styles to apply to the label.
icon { iconName: string,
iconType: IconType,
iconPosition: 'left' | 'right' }
NoAdds an icon to a component with options for specifying the icon's name, type, and position , enabling quick customization of the component's appearance.
colorStyle { backgroundColor: string, selectBackgroundColor: string, selectTitleColor: string,
titleColor: string }
NoStyles for chip color.
size 'small' | 'medium' | 'large'NoThe size of the chip. Default value: 'small'
onChange(event:boolean)=> voidYesReturns whether the chip is selected.
disabledboolean NoIf true the user won't be able to toggle the chip. Default value: false
themeUITheme NoThe theme to use for the component.
typographyUITypographyNoThe typography to use for the component.