Block

Create From Prompt.

The "Describe it. We'll build the first draft." page: an address field with availability, a description, template chips, a model Select with a cost hint and a Generate button, plus a progress card with a step list, times and a streaming Writing box.

Installation#

$npx lanterncn add create-from-prompt

This copies the file into components/create-from-prompt and installs every component it uses. With the shadcn CLI: npx shadcn@latest add httptim/lantern-ui/create-from-prompt.

Usage#

Render it from any page.

import CreateFromPrompt from "@/components/create-from-prompt/create-from-prompt";

export default function Page() {
  return <CreateFromPrompt />;
}

The build is simulated on a timer. Replace generate with a call to your backend and feed the step states, times and streamed text from its events.

Picking a template chip replaces the description with that template's text. The address shows Available, Taken or a format hint as you type, announced politely to screen readers. The progress card moves under the form below 1280px.