mayurrawte

Prompt Input

AI chats

About

A chat-style prompt input box with a textarea, footer actions, character counter, and removable attachment chips for AI chat interfaces.

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

Code

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

Usage.tsx

"use client";

import {
  PromptInput,
  PromptInputTextarea,
  PromptInputFooter,
  PromptInputActions,
  PromptInputCharCount,
} from "@/components/ui/prompt-input";
import { Button } from "@/components/ui/prompt-input-utils/button";
import { useState } from "react";

export default function PromptInputDemo() {
  const [value, setValue] = useState("");
  return (
    <div className="w-full max-w-xl">
      <PromptInput>
        <PromptInputTextarea
          placeholder="Ask anything…"
          value={value}
          onChange={(e) => setValue(e.target.value)}
          rows={2}
        />
        <PromptInputFooter>
          <PromptInputActions>
            <Button variant="primary" size="sm" disabled={!value.trim()}>
              Send
            </Button>
          </PromptInputActions>
          <PromptInputCharCount count={value.length} max={2000} />
        </PromptInputFooter>
      </PromptInput>
    </div>
  );
}

More by mayurrawte

View all
  • Feedback Buttons

    Feedback Buttons

    4
  • Streaming Text

    Streaming Text

    4
  • MCP Scope Inspector

    MCP Scope Inspector

    2
  • Tooltip

    Tooltip

    2
  • Accordion

    Accordion

    2
  • Skeleton

    Skeleton

    2
  • Select Dropdown

    Select Dropdown

    1
  • Loader

    Loader

    1

More in AI chats

View all
  • AI Actions

    AI Actions

    361
  • Aquarium Prompt

    Aquarium Prompt

    168
  • AI Artifact

    AI Artifact

    17
  • AI Suggestions

    AI Suggestions

    22
  • AI Orb

    AI Orb

    216
  • Agent Chat

    Agent Chat

    21
  • Color Picker

    Color Picker

    229
  • AI Task List

    AI Task List

    198