FormSubmit and FormReset
Submit with a spinner. In edit mode both wait for a change.
Example
Installation
bunx --bun shadcn@latest add @fieldkit/form-submitNeeds the @fieldkit registry. Add it once
Usage
Terminal
import { FormReset } from "@/components/form/form-reset"import { FormSubmit } from "@/components/form/form-submit"
<FormSubmit>Save changes</FormSubmit><FormReset />API reference
FormSubmit
PropDescription
requireChangesboolean = true in edit modeDisabled until a value changes....button propsReact.ComponentProps<typeof Button>Any Button prop except type and disabled.FormReset
PropDescription
childrenReact.ReactNode = "Discard changes"Button label.