Chat Composer

Chat message form with an auto-growing textarea that stops at a fixed height and scrolls, and a send button that turns into stop while a reply streams. Enter sends, Shift+Enter adds a line.

Open the preview in a new tab

The source comes with full access.

One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.

Installation

pnpm dlx shadcn add @01orbital/chat-composer
npx shadcn add @01orbital/chat-composer
yarn shadcn add @01orbital/chat-composer
bunx --bun shadcn add @01orbital/chat-composer

Part of the 01orbital library. With a license, put ORBITAL_TOKEN in .env.local and the same command installs it (licensed install, pricing).

It lands at components/chat/chat-composer.tsx, as source you own and edit.

Usage

"use client"

import * as React from "react"

import { ChatComposer } from "@/components/chat/chat-composer"

export default function ChatComposerDemo() {
  const [, setSent] = React.useState<string[]>([])
  return (
    <ChatComposer
      className="w-full max-w-md"
      onSend={(value) => setSent((prev) => [...prev, value])}
      onStop={() => {}}
      streaming={false}
    />
  )
}

API reference

Prop

Type

Dependencies

npm: @phosphor-icons/react, cn. The CLI installs them for you.

Registry pieces it installs with it:

  • input-group

On this page