Chip
Compact toggle for filters and categories.
Usage
import { Chip } from '@smartui/react';
import '@smartui/react/styles.css';When to use
- Filtering a list.
When not to use
- Showing a status. Use Badge.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
isSelected, defaultSelected, onChange | boolean, boolean, (v) => void | - | |
size | 'sm' | 'md' | 'md' | |
onRemove | () => void | - | Adds a remove button. |
leadingIcon | ReactNode | - |
Accessibility
- Selected is marked by background, border and text color together.