Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA settings row whose switch flips at once, shows Saving while the request runs, rolls back with an error line on failure and ignores presses mid-save.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use this for settings that save on change, such as notifications, privacy and integrations.
Do not use it where a save needs a confirmation, or for settings that only take effect on a form submit.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
label, description | string | - | Visible text. |
checked | boolean | - | Saved state. |
onChange | (checked: boolean) => Promise<void> | - | Save; reject to roll back. |
htmlFor, aria-describedby); aria-busy is set while saving.| Key | Action |
|---|---|
| Space | toggles the switch |
The pattern ships a Testing Library test (switch-optimistic-row.test.tsx) that covers label and description, optimistic flip with Saving, rollback and ignoring a second press.