Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Textarea

    The multi-line sibling of Input, with the same styles and floating label. It grows as you type, so short notes stay small and long ones get room.

    Install

    Installs Field, the shell it shares with Input.

    npx shadcn@latest add @nelumbo/textarea

    Variants

    The label rests on the first line and rises on focus. Type a few lines: the box grows up to maxRows, then scrolls.

    filled

    Visible to everyone on the project.

    48 / 160

    outlined

    Visible to everyone on the project.

    48 / 160

    Sizes

    sm tightens the padding, for comments and dense panels.

    Without a label

    The placeholder stays visible. Give the field an aria-label.

    Usage

    import { Textarea } from "@/components/ui/textarea"​<Textarea label="Message" maxLength={280} description="Visible to the whole team." /><Textarea variant="outlined" size="sm" label="Comment" rows={2} maxRows={6} />

    Props

    className goes to the wrapper; all other props and the ref go to the <textarea>.

    PropTypeDefaultNotes
    labelstringFloating label. Leave out and set aria-label instead
    variant"filled" | "outlined""filled"
    size"default" | "sm""default"
    rowsnumber3Starting height in lines
    maxRowsnumber8Grows to this many lines, then scrolls
    maxLengthnumberAlso shows a character count
    descriptionReactNodeHelp text, linked with aria-describedby
    errorReactNode | booleanMarks the field invalid; a message replaces the description