PromptSuggestion
Clickable suggestion chip for pre-filling prompt ideas. Supports an optional icon prefix.
Use and inspectUse this as a presentational interface around your own submit, stream, or state handlers. Reset preview only remounts the local example; it does not send a request or connect to a model.Next: inspect the source and wire its callback to a bounded backend action.
PromptSuggestionClickable suggestion chip for pre-filling prompt ideas. Supports an optional icon prefix.
type PromptSuggestionProps = {
suggestion: string;
onClick?: () => void;
icon?: string;
};
export function PromptSuggestion({ suggestion, onClick, icon }: PromptSuggestionProps) {
return (
<button className="pk-suggestion" onClick={onClick}>
{icon && <span className="pk-suggestion-icon">{icon}</span>}
<span className="pk-suggestion-text">{suggestion}</span>
</button>
);
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
suggestion* | string | — | Chip label text |
onClick | () => void | — | Called when chip is clicked |
icon | string | — | Optional icon character before label |