CodeSwitcher is a clean, lightweight front-end project that allows users to switch between multiple programming-language snippets inside a single UI component.
It mimics the behavior of popular documentation sites (like Stripe, Supabase, Clerk, etc.) by letting users toggle between languages and instantly see the corresponding code version. This is a purely front-end implementation using HTML, CSS, and vanilla JavaScript β perfect for demonstrating DOM manipulation, UI state handling, and component-based thinking without a framework.
π https://alan23bh.github.io/codeSwitcher/
- π Language Switcher UI β Toggle instantly between JavaScript, Python, Rust, Go, Java, and others.
- π Dark-Themed, Modern Styling β Inspired by real-world developer documentation.
- π¦ Reusable Component Pattern β Each code snippet is stored and rendered dynamically.
- β‘ Zero Dependencies β Built using HTML + CSS + Vanilla JavaScript only.
- π± Fully Responsive β Optimized for desktop, tablet, and mobile.
- π§© Clean File Structure β Easy to extend with more languages or more snippet groups.
- HTML5
- CSS3
- JavaScript (ES6+)
- Custom dark theme
- No frameworks / no libraries
Example:
<pre data-language="javascript"> ... </pre>
<pre data-language="python"> ... </pre>