Skip to Content
Components

Prompt starters

Suggested tasks that fill the composer in one click.

Prompt starters are suggested first prompts shown as cards, two to a row. Picking one writes its full prompt into the field word by word and marks the card as picked; pressing Send emits the prompt and clears the field with a sent line. Pass onShuffle to add a Shuffle button and swap in another set of starters — a new set staggers the cards in again.

Preview
Pick a starter or type your own

Usage

<!-- include core.css + prompt-starters.css -->
<div class="dm-psx">
  <div class="dm-psx-grid">
    <button class="dm-psx-c">
      <span class="dm-psx-ic"><!-- icon --></span>
      <b>Audit a page</b>
      <span class="dm-d">Check the pricing page for spacing and contrast</span>
    </button>
    <!-- more cards… -->
  </div>
  <div class="dm-psx-in">
    <span class="dm-psx-ph">Pick a starter or type your own</span>
    <span class="dm-psx-tx"></span>
    <button class="dm-psx-go" aria-label="Send" disabled><!-- up --></button>
  </div>
  <button class="dm-pill dm-ghost dm-sm dm-psx-sh"><!-- refresh -->Shuffle</button>
</div>

Properties

NameTypeDescription
startersStarter[]The starters to show, two to a row. Pass a new set to stagger them in again.
valuestring | nullThe title of the picked starter. Leave it out to let the cards pick it.
defaultValuestring | nullInitial picked title when uncontrolled.
onValueChange(title: string | null) => voidCalled with the picked starter's title, or null when cleared.
onSend(prompt: string) => voidCalled with the prompt when Send is pressed.
onShuffle() => voidAdds a Shuffle button under the field. Swap in another set of starters when called.
placeholderstringThe field's empty text. Defaults to Pick a starter or type your own.
sentLabelstringShown in the field once the prompt is sent. Defaults to Sent to the agent.
Starter.iconIconNameThe card's icon.
Starter.toneblue | purple | green | orange | red | yellow | pink | tealColours the icon.
Starter.titlestringA few words, like "Audit a page".
Starter.descriptionstringOne quiet line under the title.
Starter.promptstringThe full prompt it writes into the field when picked.

Theming

Works in light and dark (data-theme="dark") and in the Soft style (data-style="soft"). The cards sit on a chip fill that lifts to a surface with a faint ring when picked; the field is a pill on a surface with the shared shadow, and the Send button uses the accent tokens (a disabled hatch until a starter is picked). All colours, radii and spacing come from the --dm-* tokens.

On this page