Chip
Chips are compact elements that can represent inputs, attributes, or actions. They can have an icon or avatar on the left, and a close button icon on the right. They are typically used to:
• Present multiple options \ • Represent attributes active or chosen \ • Present filter options \ • Trigger actions related to primary content
How to use
import React from 'react';
import {Chip} from '@gyri/native-ui-components';
const MyComponent = () => {
<Chip
chipIcon={"information"}
onPress={()=>console.log('Pressed')}
chipText={'Example Chip'}
className={className}
/>
};
export default MyComponent;
| # | Name | Data type | Default value | Values | Description |
|---|---|---|---|---|---|
| 1 | mode | string | 'text' | 'text', 'outlined' | |
| 2 | icon | string | |||
| 3 | selected | boolean | false | Whether chip is selected. | |
| 4 | className | string | " | It defined external CSS stylesheet. | |
| 5 | style | object | Custom style object | ||
| 6 | textStyle | Style of Chip's text. |
For more details https://callstack.github.io/react-native-paper/docs/components/Chip