OdysseyUI

Prompt Input

Simple Prompt Interface input design.

Loading...

Installation

Usage

import PromptInput from '@/components/odysseyui/prompt-input';

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

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

PropTypeDefault
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 adding onSubmit, onFileUpload, or onSearchToggle props.


Examples

Basic Usage

<PromptInput />

Built by Shr3kx & iam-sahil. The source code is available on GitHub.

Last updated: 3/4/2026