Prompt Input

The Prompt Input component allows a user to send a message with file attachments to a large language model. It includes a textarea, file upload capabilities, a submit button, and a dropdown for selecting the model.

Installation

pnpm dlx shadcn-svelte@latest add http://sveltekit-prerender/r/prompt-input.json

Examples

Action Menu Example

File Attachment Example

Usage with AI SDK

Please send message to view response...

Model Selecttion + AI SDK Integration Example

Please send message to view response...

Prompt Input Provider Example

Provider is useful when sibling components need the same draft without prop drilling.

Live draft summary

Characters: 0

Attachments: 0

Nothing in the draft yet.