Form Submit
GitHubSubmit button that reflects the pending state of the nearest Form.
Installation
bash
pnpm dlx shadcn@latest add @cs/form-submitUsage
tsx
import { FormSubmit } from "@/components/cs/form-submit"tsx
<FormSubmit label="Save" />API Reference
FormSubmit
Submit button that reflects the pending state of the nearest Form.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| buttonClassName | string | - | Additional class name for the field wrapper. |
| buttons | (ComponentPropsWithoutRef<typeof Button> & { label?: string; icon?: ReactNode })[] | - | Buttons placed to the left of the main submit button. For more flexibility, you can use children. |
| children | ReactNode | - | The content placed to the left of the main submit button. If you only need another button, use the buttons parameter. |
| icon | ReactNode | - | Icon displayed before the main submit button label. |
| label * | string | - | Text displayed in the main submit button. |
| size | "icon" | "default" | "xs" | "lg" | "sm" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined | - | - |
| variant | "link" | "default" | "secondary" | "destructive" | "outline" | "ghost" | null | undefined | - | - |