Skip to main content

FormActions

A standard form action bar that renders Submit and Cancel buttons with consistent spacing and loading state. Place it at the bottom of a form.

πŸ“– Storybook

Preview​

Import​

import { FormActions } from "@xocialive/ui-components";

Basic usage​

<FormActions onSubmit={formik.handleSubmit} onCancel={() => navigate(-1)} isSubmitting={formik.isSubmitting} />

Props​

PropTypeDefaultDescription
onSubmit() => voidβ€”Submit button handler
onCancel() => voidβ€”Cancel button handler
isSubmittingbooleanfalseShows a spinner and disables submit
submitLabelstring"Save"Submit button label
cancelLabelstring"Cancel"Cancel button label
sxSxProps<Theme>β€”Root element style overrides