# ion-chip
Chips represent complex entities in small blocks, such as a contact. A chip can contain several different elements such as avatars, text, and icons.
## Usage
### Angular
```html
Default
Secondary Label
Secondary w/ Dark label
Disabled Chip
Default
Default
Button Chip
Icon Chip
Avatar Chip
```
### Javascript
```html
Default
Secondary Label
Secondary w/ Dark label
Disabled Chip
Default
Default
Button Chip
Icon Chip
Avatar Chip
```
### React
```tsx
import React from 'react';
import { IonContent, IonHeader, IonPage, IonTitle, IonToolbar, IonChip, IonLabel, IonIcon, IonAvatar } from '@ionic/react';
import { pin, heart, closeCircle, close } from 'ionicons/icons';
export const ChipExamples: React.FC = () => {
return (
ChipExamples
Default
Secondary Label
Secondary w/ Dark label
Disabled Chip
Default
Default
Button Chip
Icon Chip
Avatar Chip
);
};
```
### Stencil
```tsx
import { Component, h } from '@stencil/core';
@Component({
tag: 'chip-example',
styleUrl: 'chip-example.css'
})
export class ChipExample {
render() {
return [
Default
,
Secondary Label
,
Secondary w/ Dark label
,
Default
,
Default
,
Button Chip
,
Icon Chip
,
Avatar Chip
];
}
}
```
### Vue
```html
Default
Secondary Label
Secondary w/ Dark label
Disabled Chip
Default
Default
Button Chip
Icon Chip
Avatar Chip
```
## Properties
| Property | Attribute | Description | Type | Default |
| ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | ----------- |
| `color` | `color` | The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | `string \| undefined` | `undefined` |
| `disabled` | `disabled` | If `true`, the user cannot interact with the chip. | `boolean` | `false` |
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
| `outline` | `outline` | Display an outline style button. | `boolean` | `false` |
## CSS Custom Properties
| Name | Description |
| -------------- | ---------------------- |
| `--background` | Background of the chip |
| `--color` | Color of the chip |
## Dependencies
### Depends on
- [ion-ripple-effect](../ripple-effect)
### Graph
```mermaid
graph TD;
ion-chip --> ion-ripple-effect
style ion-chip fill:#f9f,stroke:#333,stroke-width:4px
```
----------------------------------------------
*Built with [StencilJS](https://stenciljs.com/)*