charcell 0.1.0
mode

Textarea

several lines of text, growing as you type.

usage

example

code

import { Textarea } from 'charcell/react';

export function TextareaExample() {
  return <Textarea placeholder="warning: do not" aria-label="sign" />;
}

as text

at rest
┌──────────────────────┐
│ warning: do not      │
│                      │
│                      │
└──────────────────────┘
hover
┌──────────────────────┐
│ warning: do not      │
│                      │
│                      │
└──────────────────────┘

props

valuestring
The text, held by the consumer; pair it with onValueChange.
binds with v-model:value in vue, bind:value in svelte
onValueChange(value: string) => void
Called with the text on every change.
defaultValuestring
The text to start with, uncontrolled: the field owns it from there.
variant'boxed' | 'dense'= 'boxed'
boxed draws the ring around the field; dense is a bare faint strip.
border'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of every side of the boxed field's ring: single, rounded, heavy, double or none.
borderX'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's start and end sides, over border.
borderY'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's top and bottom sides, over border.
borderTop'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's top side, over borderY and border.
borderEnd'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's end side, over borderX and border.
borderBottom'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's bottom side, over borderY and border.
borderStart'none' | 'single' | 'rounded' | 'heavy' | 'double'
The style of the boxed field's ring's start side, over borderX and border.
rowsnumber= 3
The height in rows of text; with autosize, the least height.
autosizeboolean= true
The field grows with its content.

it also takes any other attribute of its <textarea>.