Components
Effect Form
Reusable Effect Form fields, submission state, errors, grouping, file inputs, and dirty-navigation blocking.
Install
Add this registry item to your app with shadcn.
bash
bunx --bun shadcn@latest add https://krakstack.net/r/effect-form.jsonOverview
effect-form provides reusable field components for @lucas-barake/effect-form-react. It includes schema-backed fields, submission errors and state, grouped fields, revert actions, and form-owned dirty-navigation blocking. Built-in English and French labels can be read or overridden with effectFormMessages.
Available Fields
TextFieldandNameField— string inputs, with a standard localized name variantTextAreaField,DescriptionField, andNullableTextAreaField— required and nullable multiline valuesCheckboxField— boolean valuesSelectFieldandFolderField— single string selectionMultiSelectFieldandNullableMultiSelectField— array and nullable array selectionSearchableSelectFieldandSingleSearchableSelectField— virtualized searchable multiple and single selectionKeyValueFieldandNullableKeyValueField— record editorsFileField— clearable nativeFilevalues through the sharedFilePickerImageField— local file and persisted URL image values with previewsRevertButton— restores a string field to its original value
Form Helpers
FieldWrappergroups related fields with a legend and optional locale badgeSubmitButtonobserves dirty, changed-since-submit, and waiting stateSubmitErrorandErrorMessagepresent typed failuresBlockNavigationobserves the form and guards unsaved navigation
Usage
tsx
const builder = FormBuilder.empty.addField("name", Schema.String);
const form = FormReact.make(builder, {
fields: { name: TextField },
onSubmit: (_, { decoded }) => save(decoded),
});
<form.Initialize defaultValues={{ name: "" }}>
<form.name label="Name" />
<SubmitError result={submitResult} />
<SubmitButton form={form} />
<BlockNavigation form={form} />
</form.Initialize>Dependencies
Packages and shadcn components required by this registry item.
Preview
Effect Form Fields
Schema-backed fields with Effect Atom submission and validation state.