| 1 |
--- |
| 2 |
id: Chip |
| 3 |
section: components |
| 4 |
cssPrefix: ['pf-v6-c-chip', 'pf-v6-c-chip-group'] |
| 5 |
propComponents: ['Chip', 'ChipGroup'] |
| 6 |
ouia: true |
| 7 |
deprecated: true |
| 8 |
--- |
| 9 |
|
| 10 |
import { Fragment, useState } from 'react'; |
| 11 |
|
| 12 |
## Examples |
| 13 |
|
| 14 |
### Chip variants |
| 15 |
|
| 16 |
Chips can be removable or read-only. The Overflow chip is a special chip that is used to expand or collapse the content of a chip group. |
| 17 |
|
| 18 |
```ts file='./ChipDefault.tsx' |
| 19 |
|
| 20 |
``` |
| 21 |
|
| 22 |
### Chip groups |
| 23 |
|
| 24 |
A chip group is a collection of chips that can be grouped by category and used to represent one or more values assigned to a single attribute. When the value of `numChips` is exceeded, additional chips will be hidden using an overflow chip. |
| 25 |
|
| 26 |
```ts file='./ChipGroupInline.tsx' |
| 27 |
|
| 28 |
``` |
| 29 |
|
| 30 |
### Chip groups with categories |
| 31 |
|
| 32 |
```ts file='./ChipGroupWithCategories.tsx' |
| 33 |
|
| 34 |
``` |
| 35 |
|
| 36 |
### Chip groups with removable categories |
| 37 |
|
| 38 |
```ts file='./ChipGroupRemovableCategories.tsx' |
| 39 |
|
| 40 |
``` |