Submit State & Loading
Async feedback primitives: SubmitButton for idle/loading/success/error form actions, Spinner (ring, equalizer bars, dots), and LoadingState surfaces.
SubmitButton Lifecycle
Spinner Variants
ring
bars
dots
LoadingState
Fetching setlist...
Loading Tape Archive
Connecting to Shimokitazawa Shelter catalog...
Quick Import
Example.tsxtsx
1import { SubmitButton, Spinner, LoadingState } from "@rekodo/react";2
3export function Example() {4 return (5 <SubmitButton6 status="loading"7 loadingText="Publishing..."8 successText="Published"9 spinnerVariant="bars"10 >11 Publish Release12 </SubmitButton>13 );14}API Reference
Props accepted by this component.
| Prop | Type | Default | Description |
|---|---|---|---|
| status | "idle" | "loading" | "success" | "error" | "idle" | Current lifecycle state of SubmitButton. Disables interaction while loading. |
| loadingText | ReactNode | "Submitting..." | Label displayed alongside the spinner during the loading state. |
| successText | ReactNode | "Saved" | Label displayed with a checkmark when status is success. |
| errorText | ReactNode | "Failed" | Label displayed with an error icon when status is error. |
| spinnerVariant | "ring" | "bars" | "dots" | "ring" | Loader animation style used in SubmitButton, Spinner, and LoadingState. |
| variant | "default" | "secondary" | "outline" | "ghost" | "danger" | "brutalist" | "poster" | "default" | Inherits all Rekodo Button variants for SubmitButton. |