Simple Prompt Interface input design.
Installation
Usage
How It Works
- Uses a controlled textarea with internal state.
- Automatically resizes using
useLayoutEffect(max height: 240px). - Pressing Enter (without Shift) prevents newline and can trigger submit logic.
- Includes:
- File attachment trigger
- Search toggle button
- Microphone button
- Send button
- Hidden
<input type="file" />handles file selection. - Search button toggles active visual state.
API Reference
PromptInput
| Prop | Type | Default |
|---|---|---|
value? | string | - |
searchEnabled? | boolean | false |
Note: This component currently does not expose external props.
It is designed as a self-contained prompt UI.
You can extend it by addingonSubmit,onFileUpload, oronSearchToggleprops.