Building a Toggle Switch with the Bi-Stable Redstone Relay
What the Bi-Stable Relay Does
The Bi-Stable Redstone Relay holds its output state until it is told to change. A short input pulse flips it on; the next pulse flips it off. This makes it the block to reach for when you want a lever-like toggle that is driven by redstone instead of by hand.
Craft it through the redstonepen:crafting_extended_shapeless recipe type, combining the loose ingredients in any arrangement in the grid. Place the finished block where the output needs to live.
Wiring the Toggle
Feed your trigger signal into the relay's input face. That trigger can come from a Bone Button, a Brass Button, a Deepslate Lever, or any other redstone source. Each pulse you send flips the stored state, and the output face holds that state steadily between pulses.
Use the steady output to drive a door, a lamp, or the input of another relay. Because the state persists, you do not need to hold the button down. If you want the toggle to also pass a one-tick edge along, place a Pulse Redstone Relay downstream of the Bi-Stable Redstone Relay so the state change is converted into a clean pulse for the next stage.