mmrahmanbappi

Basic Prompt Box

AI chats

About

A clean chat-style prompt textarea that auto-grows, enables its send button only when there's text, submits on Enter (Shift+Enter for a new line), and appends sent messages to a log above it. Ported to React from MM Rahman Bappi's 100 Free AI UI Components (MIT).

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Basic Prompt Box to your project and fits it to your theme.

Code

How Basic Prompt Box is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import BasicPromptBox from "@/components/ui/basic-prompt-box";

export default function BasicPromptBoxDemo() {
  return (
    <div className="flex min-h-screen w-full items-center justify-center bg-[#f7f7f8] p-6">
      <BasicPromptBox placeholder="Ask anything" />
    </div>
  );
}

More by mmrahmanbappi

View all
  • Web Search Indicator

    Web Search Indicator

    20
  • Prompt with Model Picker

    Prompt with Model Picker

    2
  • Thumbs Down with Reasons

    Thumbs Down with Reasons

  • Advanced Parameters Panel

    Advanced Parameters Panel

  • Code Block with Copy Button

    Code Block with Copy Button

  • Compare Answers

    Compare Answers

  • Send Shortcut Prompt

    Send Shortcut Prompt

  • Answer Versions

    Answer Versions

More in AI chats

View all
  • AI Actions

    AI Actions

    328
  • Streaming Text

    Streaming Text

    18
  • Attachments

    Attachments

    26
  • Color Picker

    Color Picker

    132
  • Agent Chat

    Agent Chat

    18
  • Memory Scope

    Memory Scope

    3
  • AI Task List

    AI Task List

    171
  • Message Thread

    Message Thread

    50