Introducing PrimeReact v11-alpha 🎉Discover Now

Chip

Chip represents entities using icons, labels and images.

What are you interested in?

You can select multiple answers.

Music
🎬
Movies
✈️
Travel
🍔
Food
Sports
🎮
Gaming
📚
Reading
Photography
💪
Fitness
💻
Technology
Art
🌿
Nature
🛍️
Shopping
👨‍🍳
Cooking
🐶
Pets
Cars
👕
Fashion
🔬
Science
preview

Installation#

npx shadcn@latest add @primereact/chip

Usage#

import { Chip, ChipLabel, ChipStart, ChipEnd, ChipRemove } from '@/components/ui/chip';
<Chip>
    <ChipStart />
    <ChipLabel>Label</ChipLabel>
    <ChipEnd>
        <ChipRemove />
    </ChipEnd>
</Chip>

Examples#

Basic#

Displays compact information with an optional remove action.

What are you interested in?

You can select multiple answers.

Music
🎬
Movies
✈️
Travel
🍔
Food
Sports
🎮
Gaming
📚
Reading
Photography
💪
Fitness
💻
Technology
Art
🌿
Nature
🛍️
Shopping
👨‍🍳
Cooking
🐶
Pets
Cars
👕
Fashion
🔬
Science
basic-demo

Variant#

GitHub
GitHub
GitHub
variant-demo

Start & End Elements#

Apple
Facebook
Google
Microsoft
GitHub
start-end-demo

With Avatar#

AE
Amy Elsner
AJ
Asiya Javayant
Onyama Limba
OL
XF
Xuxue Feng
with-avatar-demo

Template#

Chip also allows displaying custom content inside itself.

Apple
Facebook
Google
Microsoft
GitHub
template-demo

API#

Sub-Components#

See Primitive API for ChipRoot, ChipStart, ChipLabel, ChipEnd, and ChipRemove component documentation.

Hooks#

See Headless API for useChip hook documentation.

Accessibility#

See Chip Primitive for WAI-ARIA compliance details and keyboard support.