Docs / Components

SenseChipComponent

Compact pill from @artificialsenselabs/ui for tags, filters, and multi-select choices with optional remove and toggle modes.

Live demo: run nx serve showcase and open /components/chip (port 4202).

Overview

Category: Display / input. Selector: sense-chip. Import: import { SenseChipComponent } from '@artificialsenselabs/ui';

<sense-chip label="Angular" color="primary" [removable]="true" />

Inputs

InputTypeDefaultDescription
labelstring | nullnullVisible chip text.
imagestring | nullnullOptional circular avatar URL.
imageAltstring | nullnullAvatar alt text; falls back to chip.image-alt i18n.
removablebooleanfalseShows dismiss sense-icon-button; host role="group".
selectablebooleanfalseToggle selection on click or Space/Enter.
selectedbooleanfalseSelected state when selectable is true.
size'sm' | 'md' | 'lg''md'Chip scale token.
color'primary' | … | 'neutral''primary'Semantic colour treatment.
styleClassstring | nullnullAdditional host classes.

Outputs

OutputTypeDescription
removedMouseEventEmitted when the remove button is activated.
selectedChangebooleanEmitted when selection toggles in selectable mode.

Accessibility

  • Selectable chips expose role="button", aria-pressed, and tabindex="0".
  • Removable chips use role="group"; dismiss is a labelled sense-icon-button.
  • Keyboard: Space and Enter toggle selection when selectable is true.
  • Provide imageAlt when using avatar images.

APG reference: WAI-ARIA button pattern (toggle chips).