Skip to content

Alan23bh/codeSwitcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeSwitcher

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.


πŸš€ Live Demo

πŸ”— https://alan23bh.github.io/codeSwitcher/


🎯 Features

  • πŸ”„ 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.

πŸ› οΈ Tech Stack

  • HTML5
  • CSS3
  • JavaScript (ES6+)
  • Custom dark theme
  • No frameworks / no libraries


🧠 How It Works

Each code block is wrapped with a data-language attribute

Example:

<pre data-language="javascript"> ... </pre>
<pre data-language="python"> ... </pre>

Releases

No releases published

Packages

No packages published