Response Fork
ProNewPage through alternate replies beneath one prompt, with a branch rail that tracks the active answer.
Installation
pnpm dlx shadcn@latest add @viewport/response-fork
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| prompt* | stringUser message shared by all branches. | — |
| replies* | Reply[]Alternate answers in display order, each with a stable ID. | — |
| onSelect | (id: string) => voidReceives the selected reply ID when changing branches. | — |
Accessibility
- Previous and next controls are named and stop at the ends. Reply changes are announced politely.