Form
uitemplate
compound input container with validation
Terminal
$termuijs render form
Installation
$ bunx termuijs add form
Copies the source into src/components/form/ and installs @termuijs/core, @termuijs/ui, @termuijs/widgets.
Usage
ts
import { Form } from '@termuijs/ui'ts
new Form(fields: FormField[], options: FormOptions = {})API Reference
Form
| Prop | Type | Required | Description |
|---|---|---|---|
fields | FormField[] | required | — |
labelColor | Style['fg'] | optional | — |
errorColor | Style['fg'] | optional | — |
activeColor | Style['fg'] | optional | — |
onSubmit | (values: Record<string, string>) => void | optional | — |