Skip to content

Chip

Compact labels for people, selections, and small pieces of information.

Material Design
TypeScript

Installation

Terminal
pnpm dlx shadcn@latest add https://react-toolbox.io/r/chip.json

New here? Set up your project first. Styles, fonts, and required components are included.

Usage

Use deletable for removable selections and deleteLabel to name the delete action.

State and callbacks

Remove the item from your collection in onDeleteClick. deletable exposes the action; the chip does not remove itself.

API reference

Key props and defaults. Full types and inline documentation are included with the source in material/chip.

Chip

Property Type Default
deletable boolean false
deleteLabel string 'Remove'
disabled boolean false
onDeleteClick (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>) => void —

Material guidelines

  • Represent a compact entity, attribute, or selected value. Keep chip text short; use a card or list row for richer content.
  • Chips are 32px high. When deletion is available, make the delete action distinguishable and keyboard accessible.

Material Design 1: Chips