Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA settings switch that flips at once, saves in the background, shows Saving and Saved next to it, and flips back with an explanation if saving fails. Use this when a setting applies immediately and there is no Save button.
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.
A preference is a single on/off value that takes effect right away (notifications, dark mode sync, feature flags in settings).
Do not use it when: When several settings must change together or need review, use one form with a Save button and the unsaved changes bar.
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 | Description |
|---|---|---|
label, description | string | The setting's name and what it does. |
initial | boolean | Starting value. |
save | (next: boolean) => Promise<void> | Persist the value; reject to put the switch back. |
role="switch") with a visible label and a description linked by aria-describedby.The pattern ships with a Testing Library test (optimistic-setting-toggle.test.tsx) that covers: its main behaviour, the keyboard path and the error or empty states.