Skip to content

Prompt composer

Dark hero with a ribbon glow and a prompt composer.

Usage

Usage
import { HeroPrompt } from '@/components/blocks/hero-section-02'


<HeroPrompt
  description="Describe a screen and get a polished layout in seconds"
  placeholder="What should we build?"
  speeds={['Fast', 'Balanced', 'Thorough']}
  suggestions={['A habit tracker home screen', 'A SaaS pricing page']}
  onSubmit={(prompt, { mode, speed }) => console.log(prompt, mode, speed)}
/>

Install

pnpm dlx shadcn@latest add @pastaui-pro/hero-section-02

Source

Props

Prompt composer props
PropTypeDefaultDescription
titleReactNode= Two-line headlineThe main heading.
descriptionstring= Short introductionSupporting copy below the headline.
modesHeroPromptMode[]= Landing / DashboardLabel and icon pairs for the composer mode toggle.
placeholderstring= What should we cook up today?Composer placeholder text.
speedsstring[]= ['Quick', 'Al dente', 'Slow-cooked']Options in the speed dropdown; the second is selected by default.
suggestionsstring[]= Three sample promptsChips that fill the composer when clicked.
onSubmit(prompt, { mode, speed }) => void= —Called with the trimmed prompt and selected options.
classNamestring= —Additional classes for the section.