Skip to content

Chip

A small tinted label with an icon, in eight tones and four sizes: a status, a type, an app, or a filter you press.

LabelStatusFilter
npx shadcn@latest add @silicon-ui/chip

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/chip

Manually

  1. Copy these files into your project

    • components/silicon-ui/chip/chip.tsx
    • components/silicon-ui/chip/chip.module.css
  2. Add the foundation, once per app, for the design and motion tokens

    npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

usage.tsx
import { Chip } from "@/components/silicon-ui/chip/chip";

API reference

Chip

PropTypeDefault
children*

The words.

ReactNode—
size

Height in px. Defaults to 24.

ChipSize

20242832

—
tone

Defaults to neutral.

ChipTone

"neutral""blue""violet""green""amber""orange""coral""rose"

—
variant

Defaults to tint.

ChipVariant

"outline""tint""ring""quiet"

—
shape

Defaults to soft.

ChipShape

"soft""pill"

—
icon

An icon at the start, sized by the chip (12 to 18px). Its colour is the tone. Duotone icons look as designed: a back layer drawn with an `opacity` attribute (Phosphor's duotone weight) shows at 40%.

ReactNode—
iconOnly

Shows the icon alone in a square; the words stay as the chip's name for screen readers and its tooltip.

boolean—
shrink

Lets the chip shrink in a row that is too narrow; its words end in "…".

boolean—

Also accepts the props of HTMLAttributes.

ChipButton

PropTypeDefault
children*

The words.

ReactNode—
size

Height in px. Defaults to 24.

ChipSize

20242832

—
tone

Defaults to neutral.

ChipTone

"neutral""blue""violet""green""amber""orange""coral""rose"

—
variant

Defaults to tint.

ChipVariant

"outline""tint""ring""quiet"

—
shape

Defaults to soft.

ChipShape

"soft""pill"

—
icon

An icon at the start, sized by the chip (12 to 18px). Its colour is the tone. Duotone icons look as designed: a back layer drawn with an `opacity` attribute (Phosphor's duotone weight) shows at 40%.

ReactNode—
iconOnly

Shows the icon alone in a square; the words stay as the chip's name for screen readers and its tooltip.

boolean—
shrink

Lets the chip shrink in a row that is too narrow; its words end in "…".

boolean—

Also accepts the props of ButtonHTMLAttributes.

Dependencies

npm
None
Registry
silicon-motion-tokens