Mutex Buttons App
Try It Now
To test the Mutex Buttons App yourself and see the functionality in action, click the link below:
Overview
The Mutex Buttons App is a lightweight web interface that mimics a small control panel. A power button enables or disables the four input buttons, and the app remembers your selection using the browser's localStorage
.
Features
- Power Toggle: Disables or enables the button panel.
- Mutually Exclusive Buttons: HDMI, VGA, HDMI Audio, and 1/8" Audio—with only one active at a time.
- Status Message: Clearly shows the current selection or that the panel is off.
- Persistent State: Remembers power state and selected button across reloads.
Purpose
Demonstrates Codex's ability to generate small, stateful web applications with client-side storage and interactive UI.
How It Works
- Powering On/Off: Click the Power button to toggle the panel. When off, all buttons are disabled.
- Selecting Inputs: With power on, choose any button to activate it. Selecting a new one deselects the previous.
- State Persistence: Both power state and active selection are saved in
localStorage
and restored on page load.