Switch
Autosave Switch
A switch with deferred saving: the thumb moves at once, while the line beneath honestly goes through "saving" and "saved".
What you can change
- the setting caption through label and the calm text through description
- the pause before the saved phase through delay
- the phase wording through savingText and savedText
A link for your AI agent: preview, code and instructions.
Preview
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.ru/c/switch-006?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
For developers
The install command lives in the “Component source” block below — a signed link that stays valid for 24 hours.
Technical notes
A client component: a useState on the state and on the writing phase, a useRef holding the timers, and a useEffect clearing them on unmount. The status line is declared role="status" and has a fixed minimum height so that the card does not jump. The indicator is a ring with a coloured top edge, and the check mark is the corner of a square at 45°; both animations are suppressed by prefers-reduced-motion. The palette lives in --vibeui-switch-006-*.
Tags
- switch
- autosave
- status
- async
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…