ngx-prompt-kit

Spartan replacements

Components that spartan/ui now ships, or that another ngx-prompt-kit component covers, were removed. Add the spartan helm component with its CLI (ng g @spartan-ng/cli:ui) and compose it as below.

Examples

loader → hlm-spinner

pk-loader's spinner variants are hlm-spinner; its text variants are a span with spartan's shimmer utility.

Thinking

text-shimmer → shimmer

Spartan's tailwind preset ships a shimmer utility. Tune it with --shimmer-duration, --shimmer-spread and --shimmer-color.

Searching the web…

message → hlm-message + hlm-bubble

hlmMessage lays out the row, hlmMessageAvatar the avatar, hlmBubble the bubble. Render markdown with pk-markdown inside the bubble content.

What's the capital of France?
AI
Paris.

system-message → hlm-alert

An out-of-band notice is an hlm-alert; put the call to action in hlmAlertAction.

chat-empty → hlm-empty

The empty state of a chat is hlm-empty; suggestions go in hlm-empty-content.

How can I help today?

Ask anything, or start from a suggestion.

prompt-input → hlm-input-group

A textarea in an input group with a block-end addon for the actions. For a full chat composer (autosize, Enter to send, stop button, attachments) use pk-composer.

scroll-button → hlmBtn

A scroll-to-bottom button is an hlmBtn that calls the chat container. With spartan's hlm-message-scroller, use its hlmMessageScrollerButton instead.

model-picker, model-list → pk-model-selector

pk-model-selector covers both: search, maker rail, curated sections, price tiers, a bottom sheet on phones and an inline mode. For a full catalogue page use pk-model-browser.

See the Model Selector and Model Browser pages for live examples.

stream-controls → hlmBtn

Swap the button on the stream state. Inside pk-composer the send button already turns into stop while busy.

thinking-bar → shimmer

A status line is a span with the shimmer utility; put a stop button next to it if you need one. To show the thinking itself, use pk-reasoning or pk-chain-of-thought.

Thinking