Pathfinderby Commenda
AI elements

Suggested prompt

A compact starter prompt that emits text for the host to insert or send.

Usage

Example.tsx
import { SuggestedPrompt } from '@commenda/pathfinder/suggested-prompt';

<SuggestedPrompt
  label="Review upcoming filings"
  prompt="Review all filings due in the next 30 days"
  onSelect={setDraft}
/>;

onSelect receives prompt, or label when no separate prompt is provided. The application decides whether selection fills the Composer or sends a first message. The example inserts text and focuses the editor; it does not send without review.

API reference

PropTypeBehavior
labelRequiredstringRequired visible and accessible text
promptstringOptional full text; defaults to label
onSelectRequired(prompt: string) => voidRequired selection callback

Design rules

  • PROMPT-01: Figma 1058:8: Copy13, one line, full radius, 12px horizontal/6px vertical inset, pearl200 fill and pearl300 hover/border. The hairline makes the exported frame 33px high around 32px content.
  • PROMPT-02: Selection emits text; the library does not own requests or mutate a draft.
  • PROMPT-03: Long labels truncate within their container while preserving the full accessible name and title. Prefer short, concrete tasks.

This uses native button semantics with its own prompt recipe; it is not a Button variant. Enter and Space activate it, and focus remains visible. For several starters use Suggested prompt group.

On this page