HTML + CSSToggles

Railway semaphore toggle

The arm of a railway signal rises to 45 degrees with a mechanical bounce and the lamp turns from red to green.

Settings

16px
1x

Code

<label class="uvq03-rsg"><input type="checkbox" role="switch"><span class="sg"><i class="ms"></i><i class="ld"></i><i class="bs"></i><i class="am"></i><i class="pv"></i><i class="lp"></i></span>Line clear</label>

Prompt for AI

Paste it into ChatGPT, Claude or Cursor and it will adapt the block to your project with these settings, even if you don’t use React.

Markdown version with all the code, for AI assistants

More in Toggles

See all Toggles

Where to use it

Old railway lines used semaphore signals, and this switch draws one with a mast, ladder, base and a striped red arm. Turning it on lifts the arm to 45 degrees with a slight overshoot, like a heavy lever settling, and the lamp beside the pivot changes from red to green. It is a clear way to show go and stop in route planners, deploy tools or model railway sites.

The main color is the arm and the stop lamp, the second one the clear lamp. Keep the classic red and green for meaning, or use the brand color for the arm and leave the lamp green.