Components
Textarea
A multi-line text input that can grow with its content.
Installation
Install @vinui/react from GitHub with pnpm, then import its stylesheet once, in your root layout or entry file:
pnpm add github:vindotski/vinui#path:packages/react
import '@vinui/react/styles.css';
Usage
A multi-line text input built on Headless UI's Textarea:
import { Field, Label, Textarea } from '@vinui/react';
<Field>
<Label>Comment</Label>
<Textarea name="comment" autoResize />
</Field>;
- Three rows tall by default, resizable vertically; pass
resizable={false}to turn that off. autoResizegrows it with its content (CSSfield-sizing; browsers without support keep a fixed height).invalidgives a red border and setsaria-invalid.
More to come
Detailed examples, keyboard interaction and the full component API are on their way.