A lightweight, customizable tabs interface built with vanilla JavaScript, HTML, and CSS.
- ✨ Clean, minimalist design
- 🚀 Vanilla JavaScript - no dependencies
- 📱 Responsive and mobile-friendly
- 🎨 Easily customizable
- ⚡ Lightweight and fast
Clone the repository:
git clone https://github.com/TheRealSaiTama/SimpleHTML.git
cd SimpleHTML/TabsOr download the files directly:
- index.html
- style.css
- script.js
Simply open index.html in your browser to see the tabs in action.
<div class="tabs">
<ul>
<li><a href="#tab1">First Tab</a></li>
<li><a href="#tab2">Second Tab</a></li>
<li><a href="#tab3">Third Tab</a></li>
</ul>
<div class="tab-content" id="tab1">
<!-- Content for first tab -->
</div>
<!-- More tab content divs -->
</div>You can easily customize the appearance by modifying the CSS in style.css. Some key styling elements:
div ul li {
/* Tab styling */
}
div ul li.active {
/* Active tab styling */
}
.tab-content {
/* Content panel styling */
}The JavaScript in script.js handles:
- Showing/hiding tab content
- Tracking active tabs
- Managing click events
- Setting defaults on page load
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
