RetroPromptInput

A Mac OS 9 chat composer: an inset edit field that grows with its text, a default Send button that becomes Stop while a reply streams (⌘-period), and slots for attachments and a model picker.

Installation

npx shadcn@latest add "https://nostalgia-ui.com/r/retro-prompt-input.json"

Setup: installing any component also installs nostalgia-theme (the --os9-* tokens and os9-* utilities) via registryDependencies. To add the theme on its own: npx shadcn@latest add https://nostalgia-ui.com/r/nostalgia-theme.json. Put @layer ui-sdk; above @import "tailwindcss" in your global CSS (why).

Import

import { RetroPromptInput } from "@/components/ui/retro-prompt-input"

Usage

const { messages, sendMessage, status, stop } = useChat()

<RetroPromptInput
  status={status}
  onSubmit={(text) => sendMessage({ text })}
  onStop={stop}
  toolbar={<RetroModelPicker models={models} value={model} onValueChange={setModel} />}
/>

Basic

No messages yet.

Status: ready

Return sends and Shift-Return starts a new line. Press Return and watch the Send button: it shows its pressed face for a beat before the message goes, as the Mac did for a dialog's default button. While the reply comes in, Send becomes Stop; ⌘-period or Escape presses it.

Toolbar and Attachments

No messages yet.

  • Read Me.txt

toolbar holds leading controls such as a model picker or an attach button. attachments takes file parts and shows them as chips above the field; with files attached, an empty draft can still be sent. The field grows to eight lines, then scrolls.

Disabled