Browse · collection
React form elements
Accessible form components for React, each a capability with its own page, its own render tests and TypeScript you can read. The pure helpers they use are ordinary capabilities: some run in Python and Rust too, so a server can check what the form checked.
Components
Everything published as react.form.* : 18 capabilities, written for React in TypeScript only.
react.form.address-fields React ^19 · TypeScript only
A UK or international address form under one legend: each line labelled and autocompleted, checked by form.address.
AddressFields in TypeScript
1.0.0ts 10 tests Apache-2.0
react.form.button React ^19 · TypeScript only
A form button in primary, secondary or warning style that stays focusable while loading (GOV.UK button).
Button in TypeScript
1.0.1ts 13 tests Apache-2.0
react.form.checkbox React ^19 · TypeScript only
One checkbox with its label beside it, such as "I agree to the terms" (GOV.UK single checkbox).
Checkbox in TypeScript
1.0.1ts 14 tests Apache-2.0
react.form.checkbox-group React ^19 · TypeScript only
A question answered by ticking any of several checkboxes, with item hints and an exclusive "None" (GOV.UK checkboxes).
A group of 2: toggleValue, CheckboxGroup
1.0.1ts 24 tests Apache-2.0
react.form.date-field React ^19 · TypeScript only
A labelled date picker (<input type="date">) with min and max, checked by form.iso-date, its error shown accessibly.
DateField in TypeScript
1.0.0ts 14 tests Apache-2.0
react.form.date-input React ^19 · TypeScript only
Day, month and year boxes under one legend, with hint, error message and the boxes in error marked (GOV.UK date input).
DateInput in TypeScript
1.0.1ts 14 tests Apache-2.0
react.form.error-summary React ^19 · TypeScript only
A "There is a problem" box linking to each field in error, focused on arrival, built from a validator's fields (GOV.UK).
A group of 2: errorSummaryItems, ErrorSummary
1.0.1ts 21 tests Apache-2.0
react.form.fieldset React ^19 · TypeScript only
Group related inputs under a legend, with a hint and error message described to the whole group (GOV.UK fieldset).
Fieldset in TypeScript
1.0.1ts 10 tests Apache-2.0
react.form.file-upload React ^19 · TypeScript only
A labelled file upload field: accept, size and how-many checked by form.file-check, the chosen files listed with errors.
FileUpload in TypeScript
1.0.0ts 13 tests Apache-2.0
react.form.form-field React ^19 · TypeScript only
Wire a label, hint and error message to one form control by id, the accessible way (GOV.UK form group pattern).
A group of 2: fieldIds, FormField
1.0.1ts 19 tests Apache-2.0
react.form.money-field React ^19 · TypeScript only
A money input with its currency symbol, locale separators and min/max, read and checked by form.money-input.
MoneyField in TypeScript
1.0.0ts 14 tests Apache-2.0
react.form.password-field React ^19 · TypeScript only
A password input with a Show/Hide button and an optional live checklist of a password policy (GOV.UK password input).
A group of 2: passwordChecklist, PasswordField
1.0.1ts 22 tests Apache-2.0
react.form.radio-group React ^19 · TypeScript only
Choose exactly one of several radios, with item hints, an "or" divider and inline yes/no (GOV.UK radios).
RadioGroup in TypeScript
1.0.1ts 14 tests Apache-2.0
react.form.select React ^19 · TypeScript only
A labelled drop-down list with a hint, error message and an optional empty first option (GOV.UK select).
Select in TypeScript
1.0.1ts 15 tests Apache-2.0
react.form.styles React ^19 · TypeScript only
An optional stylesheet for the react.form elements' caps-* classes, themed by --caps-form-* custom properties.
formStyles in TypeScript
1.0.1ts 21 tests Apache-2.0
react.form.text-field React ^19 · TypeScript only
A labelled single-line text input with hint, error message, autocomplete, prefix and suffix (GOV.UK text input).
TextField in TypeScript
1.0.1ts 14 tests Apache-2.0
react.form.textarea React ^19 · TypeScript only
A labelled multi-line text box with hint, error and an optional live character or word count (GOV.UK).
Textarea in TypeScript
1.0.1ts 16 tests Apache-2.0
react.form.validated-input React ^19 · TypeScript only
A text, email or number input that checks itself with form.validate-input and shows the error accessibly.
ValidatedInput in TypeScript
1.0.0ts 14 tests Apache-2.0
The pure helpers they use
Written for no framework: what the components require, and every form.* capability. A component may require one of these; none of these may require a component.
auth.password-policy
Check a new password against a named policy (NIST SP 800-63B-4 by default): length, common passwords, name and email.
A group of 2: passwordPolicy, checkPassword
1.0.1py rs ts 31 tests Apache-2.0 AND OGL-UK-3.0
form.address
Check a UK or international postal address form: required lines, lengths, country and postcode.
A group of 2: validateAddress, addressFormat
1.0.0py rs ts 37 tests Apache-2.0
form.character-count
The GOV.UK character count message for a text box: characters or words left or over a limit, with a threshold.
characterCount in TypeScript
1.0.1py rs ts 32 tests Apache-2.0
form.date-parts
Check a date typed into day, month and year boxes, with GOV.UK's error messages and the boxes to mark in error.
validateDateParts in TypeScript
1.0.1py rs ts 49 tests Apache-2.0
form.file-check
Check files chosen in an upload field: accept types, size, empty files and how many, with GOV.UK messages.
A group of 3: validateFiles, acceptsFile, formatFileSize
1.0.0py rs ts 52 tests Apache-2.0
form.iso-date
Check a date picker value (YYYY-MM-DD) against required, past/future and min/max rules, timezone-safe.
validateIsoDate in TypeScript
1.0.0py rs ts 24 tests Apache-2.0
form.money-input
Read a typed amount as minor units for its currency and locale, check min/max, and format it back.
A group of 3: parseMoneyInput, formatMoneyInput, moneyInputFormat
1.0.0py rs ts 61 tests Apache-2.0
form.state TypeScript only
A form's state as a pure reducer: values, touched fields, validator errors and the submit, for useReducer.
A group of 3: initialFormState, formReducer, visibleErrors
1.0.1ts 40 tests Apache-2.0
form.validate-input
Check a text, email or number input: required, length, pattern and min/max, with GOV.UK messages.
validateInput in TypeScript
1.0.0py rs ts 49 tests Apache-2.0
Use them
Name a component in one line, in the file that renders it:
import { TextField } from "#fune/react.form.text-field@^1" ;
Functional Weave ships the component, not React: install it in the project once.
npm install react react-dom
Then build, which resolves each one and the helpers it requires into .fune/build as .tsx you can read. A client component keeps its "use client" at the top of the built file.
fune build
Optional: react.form.styles for the default look. The components only set class names, so your own CSS works as well.
The forms suite is the same set as a plan, with the validation each form needs and the gaps.
These are TypeScript only: in a Python or Rust project fune build stops and says so. A helper without a flag runs in all three languages. Frameworks and language subsets .