Comment Composer

Comment box with a three row textarea and a Comment button that stays disabled until there is text. Submits the trimmed value and clears the field.

src/registry/ui/comment-composer.tsx/r/comment-composer.json

Installation#

bash
npx shadcn@latest add @minidev/comment-composer

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/comment-composer.json

Usage#

tsx
import { CommentComposer } from "@/components/ui/comment-composer"

export function Example() {
  return (
    <CommentComposer />
  )
}

API reference#

CommentComposer props
PropTypeDefault
onSubmit(value: string) => void-
placeholderstring"Add a comment…"
classNamestring-

Dependencies#

npm

React only

Built from

Examples#

All form components