Every piece here is real: @prismrepo/react, @prismrepo/adapter-rhf, @prismrepo/adapter-zod, Prism's own Layer 1 primitives (registry/ui) and Layer 2 field components (registry/fields), not a mock or a preview of something coming later. See the source on the left, and the field/primitive source itself in apps/docs/registry/.
Source (read-only, this is the actual code rendering the preview)
const registry = defineRegistry({ text: TextField, number: NumberField, ... });
interface BasicFormValues {
name: string;
age: number;
}
const definition = createFormBuilder(registry).defineForm<BasicFormValues>({
name: { type: 'text', label: 'Name' },
age: { type: 'number', label: 'Age' },
});
function BasicForm() {
const form = usePrismForm(definition, { defaultValues: { name: '', age: 0 } });
return (
<form onSubmit={form.handleSubmit((values) => console.log(values))}>
<PrismField form={form} name="name" />
<PrismField form={form} name="age" />
<button type="submit">Submit</button>
</form>
);
}Preview, type in it, submit it
Console
Playground ready. This form is real: @prismrepo/core, @prismrepo/forms, @prismrepo/react, @prismrepo/adapter-rhf, and @prismrepo/adapter-zod are all live here, not mocked.