block

TanStack Form

Type-safe forms wired to Pindoba controls

props · 28 shown · 28 total

FormField

State

  • disabled react / svelte / astro
    boolean
    default false

    Disables the field and forwards `disabled` to the control.

  • required react / svelte / astro
    boolean
    default false

    Renders a required `*` after the label.

Appearance

  • description react / svelte / astro
    string

    Help text rendered under the control and wired via `aria-describedby`.

  • label react / svelte / astro
    string

    Label text shown above (or beside) the control.

  • labelTooltip react / svelte / astro
    string FormSlotContent

    Tooltip attached to an info trigger next to the label.

  • optionalText react / svelte / astro
    string

    Optional-hint text after the label when not required (e.g. "(optional)").

  • size react / svelte / astro
    "xs" "sm" "md" "lg"
    default "md"

    Size variant, kept in sync with the control. `FormSelect`/`FormCheckbox` accept `sm`/`md`/`lg` (no `xs`).

  • tone react / svelte / astro
    "cyan" "danger" "dynamic" "mauve" "neutral" "pink" "primary" "sage" "slate" "stone" "success" "teal" "violet" "warning"

    Explicit tone override; defaults to error-derived `danger`, otherwise the control's own resting color.

Layout

  • orientation react / svelte / astro
    "vertical" "horizontal"
    default "vertical"

    Label/control layout direction.

Behavior

  • errorMode react / svelte / astro
    "touched" "submitted" "always"
    default "touched"

    When validation errors become visible: after the field is touched, after a submit attempt, or always.

  • form react / svelte / astro
    AnyFormApi

    Svelte / React only — the TanStack form instance (`createForm()` in Svelte, `useForm()` in React). In Astro the form is bound by the surrounding `<pindoba-form>`, so wrappers take no `form` prop.

  • name react / svelte / astro
    string

    Field name — a key of the form's data.

Advanced

  • passThrough react / svelte / astro
    Record<string, unknown>

    Per-slot escape hatch for Field styling and attributes.

FormControl

State

  • checked react / svelte / astro
    boolean
    default false

    Astro FormCheckbox only — initial server-rendered checked state.

  • value react / svelte / astro
    string

    Astro only — initial server-rendered value for FormInput / FormTextarea (string) / FormSelect. The form is the source of truth after hydration.

Appearance

  • placeholder react / svelte / astro
    string

    FormInput / FormTextarea / FormSelect — placeholder shown when empty.

Behavior

  • autocomplete react / svelte / astro
    string

    FormSelect only — autofill hint (e.g. `"country"`) set on the hidden native `<select>` mirror, which the browser autofills and the Select syncs from. (`autoComplete` in React.) FormInput / FormTextarea forward it like any other native attribute.

  • items react / svelte / astro
    FormSelectItem[]

    FormSelect only — the options to choose from.

  • rows react / svelte / astro
    number

    FormTextarea only — number of visible text rows. The Textarea's `resize` and `autoResize` props pass through the same way.

  • selectionMode react / svelte / astro
    "single" "multiple"
    default "single"

    FormSelect only — `"single"` (default) or `"multiple"`.

  • type react / svelte / astro
    "number" "text" "search" "email" "password" "tel" "url"
    default "text"

    FormInput only — HTML input type forwarded to `<Input>`.

Slots

  • children react / svelte / astro
    FormSlotContent

    FormCheckbox — inline text/content beside the checkbox (Svelte snippet / Astro default slot).

  • control react / svelte / astro
    FormSlotContent

    FormField only — Svelte / React render-prop for the control. Receives the props bag to spread plus the raw TanStack field API for value/handler binding. (Astro uses the default slot instead; `bindForm` auto-wires standard controls.)

FormSubmit

Appearance

  • emphasis react / svelte / astro
    "primary" "secondary" "ghost" "adaptive"
    default "primary"

    Emphasis forwarded to the underlying `<Button>`.

  • size react / svelte / astro
    "xs" "sm" "md" "lg"

    Size forwarded to the underlying `<Button>`.

Behavior

  • disableWhenInvalid react / svelte / astro
    boolean
    default false

    Also disable while the form is invalid (not just while submitting). Off by default, so submitting an invalid form surfaces its errors.

  • form react / svelte / astro
    AnyFormApi

    Svelte / React only — the TanStack form instance (`createForm()` in Svelte, `useForm()` in React). In Astro the surrounding `<pindoba-form>` binds it.

Slots

  • children react / svelte / astro
    FormSlotContent

    Button label content. Falls back to "Submit".

Type

  • Components
  • Blocks