Chips represent small pieces of information such as tags, categories, or filter values. They support colors, icons, removable state, and active state.
Playground
<ply-chip color="primary" size="md" removeLabel="Remove">Chips</ply-chip>
Use color to control the chip's color. Supported colors are primary, success, danger, warning, and accent.
<ply-chip color="primary">Primary</ply-chip> <ply-chip color="danger">Danger</ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Use size to control the chip size. Options are sm, md (default), and lg.
<ply-chip size="sm" color="primary">Small</ply-chip> <ply-chip size="lg" color="primary">Large</ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Use icon to add an icon from our Icon Pack.
<ply-chip icon="check" color="success">Completed</ply-chip> <ply-chip icon="alert-triangle" color="danger">Critical</ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Set [removable]="true" to show a close button. Listen for (removed) to handle removal.
<ply-chip color="primary" [removable]="true" (removed)="onRemove()"> Tag Name </ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Set [active]="true" to highlight the chip with a filled style. Useful for filter selection states.
<ply-chip color="primary" [active]="true">Active Chip</ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Set [disabled]="true" to prevent interaction and reduce opacity.
<ply-chip color="primary" [disabled]="true">Disabled</ply-chip>
TypeScript
import { Component } from '@angular/core';
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-chips-example',
imports: [
ChipComponent
],
template: `...`
})
export class ChipsExampleComponent {}Install
npx ply-ui-cli add chips
Run the following command to add this component to your project:
npx ply-ui-cli add chips
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Ply MCP server.
npx -y ply-ui-mcp
Ply provides standalone components. Import the exact elements you want to use into your component.
// Install: npx ply-ui-cli add chips
// Paths are relative to aliases.components (default: src/app/components)
import { ChipComponent } from './chips/chip.component';
@Component({
selector: 'app-your-component',
imports: [
ChipComponent
],
template: `...`
})
export class YourComponent {} API for chips — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
ply-chip | class | string | '' | Additional host CSS classes (merged via cn()). |
ply-chip | color | ChipColor | '' | — |
ply-chip | size | ChipSize | 'md' | — |
ply-chip | removable | boolean | false | — |
ply-chip | disabled | boolean | false | — |
ply-chip | icon | string | undefined | undefined | — |
ply-chip | active | boolean | false | — |
ply-chip | removeLabel | unknown | 'Remove' | — |
ply-chip | (removed) | void | — | Emits when removed occurs. |
ply-chip | (clicked) | void | — | Emits when clicked occurs. |
Content