ArtificialSenseDocs

Docs / Components

SenseChipComponent

Compact pill from @artificialsenselabs/ui for 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';

Choose chip for filter / multi-select (optional remove). Prefer badge for status / counts / metadata (never interactive) and tag for static category labels (optional dismiss).

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

Inputs

InputTypeDefaultDescription
labelstring | nullnullVisible chip text.
variantfilled | outlined | ghostfilledSurface treatment (ADR-0030).
severityprimary | … | neutralprimarySemantic colour role.
imagestring | nullnullOptional circular avatar URL.
imageAltstring | nullnullAvatar alt text; falls back to chip.image-alt i18n.
removablebooleanfalseDismiss control + Delete/Backspace; host role="group". Wins over selectable.
selectablebooleanfalseToggle selection on click or Space/Enter (ignored when removable).
selectedbooleanfalseSelected state when selectable.
size'sm' | 'md' | 'lg''md'Chip scale token.

Outputs

OutputTypeDescription
removedMouseEventEmitted when dismiss is activated (button or Delete/Backspace).
selectedChangebooleanEmitted when selection toggles in selectable mode.

Accessibility

  • Selectable chips expose role="button", aria-pressed, and tabindex="0". Keyboard: Space / Enter.
  • Removable chips expose role="group" and tabindex="0". Remove via the labelled dismiss button or Delete / Backspace on the focused chip.
  • Do not combine removable + selectable — removable wins and disables selection.
  • Provide imageAlt when using avatar images.

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