Oxform

Solid

Build typed Solid forms with reactive primitives and components.

Oxform Solid

Try the Solid playground for an interactive account form with source viewing.

@oxform/solid connects the core form API to Solid's reactivity. Create a form inside a component, connect fields to controls, and read reactive getters in JSX.

Both adapters ship in one package. Choose the entry matching your application's Solid version:

Solid versionImportSetup
^1.9.0@oxform/solidInstall below.
2.0.0-rc.19@oxform/solid/v2Follow the Solid 2 guide.

Install

For Solid 1, install Solid ^1.9.0 and a Standard Schema validator, such as Zod. The examples on the shared API pages use this entry.

pnpm add @oxform/solid solid-js@^1.9.0 zod

First Form

import { ,  } from '@oxform/solid';
import {  } from 'solid-js';
import {  } from 'zod';

const  = .({ : .() });

export function () {
  const  = ({
    ,
    : { : '' },
    : { : { : { :  } } },
  });
  const  = ({ , : 'email' });
  const  = .( => {
    .(.);
  });

  return (
    <
      ={ => {
        .();
        void ();
      }}
    >
      < ='signup-email'>Email</>
      < ='signup-email' ='email' {....} />
      < ={...}>{ => <>{..}</>}</>
      < ='submit' ={..}>
        Sign up
      </>
      < ='button' ={() => .()}>
        Reset
      </>
    </>
  );
}

The schema infers values and field paths. Input props use onInput to write text during typing. Configured change validation updates email.state.issues; form.submit validates again before calling the success callback.

Choose an API

TaskAPI
Create a formcreateForm
Connect a controlcreateField or Field
Use imperative field methodscreateFieldApi
Manage a dynamic listcreateArrayField or ArrayField
Observe a selected valuecreateSubscribe or Subscribe
Read aggregate form statusform.status or createFormStatus
Run a callback on changescreateFormEffect

Runnable Example

The repository's examples/solid workspace includes validation feedback, checkbox handling, keyed array rows, subscriptions, effects, submission, and reset.

pnpm install
pnpm --dir examples/solid run dev

For Solid 2, run pnpm --dir examples/solid-v2 run dev instead.