ComponentsFormSubmit

UI component

FormSubmit

FormSubmit is a Button wrapper bound to Form context. It defaults to type=submit, reads isSubmitting from context, and applies loading + disabled automatically. Every other Button prop passes through unchanged.

Installation

Install the package in your app.

pnpm add @rapidset/rapidkit

Usage

Import components from the package entrypoint.

import { FormSubmit } from '@rapidset/rapidkit';

Examples

Preview the component and copy the snippet.

Submit button with context state

FormSubmit reads isSubmitting from <Form> and toggles loading + disabled automatically.

API Reference

Commonly used props at a glance.

PropDescription
labelSets the button text; same as the underlying Button label prop.
loadingWhenSubmittingSuppresses the built-in spinner when set to false; useful if you render your own.
disableWhenSubmittingKeeps the button clickable while submitting when set to false.
variantForwards the Button variant (Default, Outline, Ghost, etc.) to control visual treatment.
leftIcon and rightIconForwards icon slots to the underlying Button so the submit button can carry leading or trailing icons.

Accessibility

FormSubmit renders a native button with type=submit and forwards aria-disabled / aria-busy state from the Button primitive so screen readers announce the submitting state correctly.

Optional access rules

Optional access rules from the host application can hide the submit button or keep it visible-but-disabled depending on the resolved policy.