ngx-prompt-kit

Prompt Suggestion

Clickable prompt chips. Two modes: pill (no highlight) and inline list (with substring highlight against a query).

Examples

Pill chips

Default style — outline buttons in a row.

Filterable list

Pass a highlight string; the matching substring is emphasized.

Installation

Add the prompt-suggestion component (and the cn() utility) to your project.

ng generate ngx-prompt-kit:prompt-suggestion

It is built on spartan/ui, so add these helm components too: button.

ng g @spartan-ng/cli:ui button

Component API

PkPromptSuggestion

PropTypeDefaultDescription
contentstring '' The suggestion text.
highlightstring '' When non-empty, switches to inline list mode and highlights this substring inside content.
variantButtonVariants["variant"] — Override the underlying hlmBtn variant.
sizeButtonVariants["size"] — Override the underlying hlmBtn size.
clickedoutput<void> — Fires when the chip is clicked.
classstring — Extra classes for the button.