Toggle
Grid Overlay
A "show grid" toggle: the button is tied to the canvas through aria-controls, and the grid switches on as a separate layer above the layout without moving anything.
What you can change
- the button caption through label
- the grid step through step
- the initial state through defaultPressed
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/toggle-004?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
One file, zero dependencies, the --vibeui-toggle-004-* palette. Client-side: useState and useId. The button declares aria-controls on the canvas — that way the button-to-region link exists somewhere other than the author's head. The grid is drawn with two linear-gradients on a separate layer with pointer-events:none and is switched on by opacity, so the layout beneath it is not repainted and does not jump. The cell step arrives in the step prop and goes out into the CSS variable --vibeui-toggle-004-step inline — it is a dynamic value and cannot be expressed by a class. A toggle, not a switch: the view changes here and now.
Tags
- toggle
- grid
- aria-controls
- canvas
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…