interface / @typed/ui/Form

SchemaBoundForm

Schema-specialized form API returned by make.

Learn this UI primitive →

Package version
1.0.0-beta.13
Category
Schema-bound components
Since
1.0.0

Import

import { SchemaBoundForm } from "@typed/ui/Form";

Signatures

export interface SchemaBoundForm<Fields extends FormFields> {
    readonly codec: Schema.Struct<Fields>;
    readonly state: (values: Schema.Struct.Type<Fields>, options?: SchemaBoundStateOptions<Schema.Struct.Type<Fields>>) => Effect.Effect<FormState<Schema.Struct.Type<Fields>>, Schema.SchemaError, Scope.Scope>;
    readonly Root: SchemaBoundRoot<Schema.Struct.Type<Fields>>;
    readonly TextInput: SchemaBoundInput<Fields, string>;
    readonly SearchInput: SchemaBoundInput<Fields, string>;
    readonly EmailInput: SchemaBoundInput<Fields, string>;
    readonly UrlInput: SchemaBoundInput<Fields, string>;
    readonly TelInput: SchemaBoundInput<Fields, string>;
    readonly PasswordInput: SchemaBoundInput<Fields, string>;
    readonly HiddenInput: SchemaBoundInput<Fields, string>;
    readonly ColorInput: SchemaBoundInput<Fields, string>;
    readonly TimeInput: SchemaBoundInput<Fields, string>;
    readonly DateTimeLocalInput: SchemaBoundInput<Fields, string>;
    readonly MonthInput: SchemaBoundInput<Fields, string>;
    readonly WeekInput: SchemaBoundInput<Fields, string>;
    readonly NumberInput: SchemaBoundInput<Fields, number>;
    readonly RangeInput: SchemaBoundInput<Fields, number>;
    readonly DateInput: SchemaBoundInput<Fields, Date>;
    readonly MaskedInput: SchemaBoundMaskedInput<Fields>;
    readonly Checkbox: SchemaBoundCheckbox<Schema.Struct.Type<Fields>>;
    readonly Select: SchemaBoundSelect<Schema.Struct.Type<Fields>>;
    readonly Error: SchemaBoundError<Schema.Struct.Type<Fields>>;
    readonly Reset: SchemaBoundReset;
    readonly Push: SchemaBoundPush<Schema.Struct.Type<Fields>>;
    readonly Remove: SchemaBoundRemove<Schema.Struct.Type<Fields>>;
    readonly Label: typeof Label;
    readonly Description: typeof Description;
    readonly Submit: typeof Submit;
    readonly Group: typeof Group;
}

Property: Checkbox

Bound native checkbox limited to boolean fields.

Property: ColorInput

Bound native color input for string-encoded string fields.

Property: DateInput

Bound native date input for Date fields encoded as strings.

Property: DateTimeLocalInput

Bound native local date-time input for string-encoded string fields.

Property: Description

Neutral description host for caller-linked explanatory content.

Property: EmailInput

Bound native email input for string-encoded string fields.

Property: Error

Bound ARIA alert for a field’s current validation message.

Property: Group

Accessible group host for related controls.

Property: HiddenInput

Bound native hidden input for string-encoded string fields.

Property: Label

Native label component; callers provide the target control ID.

Property: MaskedInput

Bound text input using the selected field’s own string codec.

Property: MonthInput

Bound native month input for string-encoded string fields.

Property: NumberInput

Bound native number input for finite-number fields encoded as strings.

Property: PasswordInput

Bound native password input for string-encoded string fields.

Property: Push

Bound button that appends to an array field.

Property: RangeInput

Bound native range input for finite-number fields encoded as strings.

Property: Remove

Bound button that removes an item from an array field.

Property: Reset

Bound reset button that restores the current form’s defaults.

Property: Root

Native form root that provides the current state to bound descendants.

Property: SearchInput

Bound native search input for string-encoded string fields.

Property: Select

Bound native select limited to string fields.

Property: Submit

Native submit button.

Property: TelInput

Bound native telephone input for string-encoded string fields.

Property: TextInput

Bound native text input for string-encoded string fields.

Property: TimeInput

Bound native time input for string-encoded string fields.

Property: UrlInput

Bound native URL input for string-encoded string fields.

Property: WeekInput

Bound native week input for string-encoded string fields.

Property: codec

Struct codec shared by state construction and every bound field.

Property: state

Creates a Scope-owned hydrated state from decoded initial values.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source