Component

Chip

A compact tag for a value, filter, or entity. It carries a leading icon or avatar, comes in six tones and five sizes, and can be removed with a trailing button.

Types

DefaultSecondaryOutlineSuccessWarningDestructive
import { ChangeDetectionStrategy, Component } from '@angular/core';

import { HbChipComponent } from '@herbst/ui';

@Component({
  selector: 'hb-demo-chip-types',
  imports: [HbChipComponent],
  template: `
    <div class="flex flex-wrap items-center gap-2">
      <span hb-chip>Default</span>
      <span hb-chip hbType="secondary">Secondary</span>
      <span hb-chip hbType="outline">Outline</span>
      <span hb-chip hbType="success">Success</span>
      <span hb-chip hbType="warning">Warning</span>
      <span hb-chip hbType="destructive">Destructive</span>
    </div>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HbDemoChipTypesComponent {}

Sizes

xssmmdlgxl

Icon, avatar, removable & disabled

TaggedKauanKauanRemovableDisabled

API reference

hb-chip

PropertyDescriptionTypeDefault
[hbType] Colour intent of the chip. 'default' | 'secondary' | 'destructive' | 'success' | 'warning' | 'outline' 'secondary'
[hbSize] Overall scale of the chip. 'xs' | 'sm' | 'md' | 'lg' | 'xl' 'md'
[hbIcon] Leading icon name. string ''
[hbImage] / [hbImageAlt] Leading avatar image URL and its alt text. string ''
[hbRemovable] Show the trailing remove button. boolean false
[hbRemoveIcon] Icon name for the remove button. string ''
[hbDisabled] Disable the chip and its remove button. boolean false
(hbRemove) Emitted when the remove button is pressed. void