NIB / PLAYGROUND
Input and textarea playground — NibComponents
Try input and textarea in Flutter. Edit a value, validate it, and keep the cursor where the user left it.
Open interactive viewEdit a value, validate it, and keep the cursor where the user left it.
Read the full component guide and API
Public widgets and APIs
- NibInput
- NibTextarea
- NibValidator
- NibValidators
Example Dart code
import 'package:flutter/material.dart';
import 'package:nib_components/nib_components.dart';
NibInput(
label: 'Display name',
placeholder: 'Ada Lovelace',
clearable: true,
validator: NibValidators.required('Enter a name.'),
onChanged: (value) { /* Update application state. */ },
)Playground controls
| Control | Type | Options or range | Help |
|---|---|---|---|
| Field type | choice | single-line, multiline | Switches between the public NibInput and NibTextarea widgets. |
| Current text | text | An explicit text edit replaces the field value. Style controls preserve selection. | |
| Maximum characters | number | 12.0–280.0 | maxLength limits typing. A validator also checks programmatic values. |
| Disabled | toggle | ||
| Animate helper and error text | toggle | Package default is off. This example starts with animation enabled. Uses the package’s NibMotion footer transition. | |
| Corner radius | number | 0.0–24.0 |
Local candidate 0.2.2 includes controller synchronization and listener cleanup repairs; hosted older versions may differ.
NibTextarea counter uses String.length (UTF-16 code units), not a grapheme count.
Widget tests do not establish physical-device or screen-reader behavior.