Tab 10
A dynamic workspace tab strip with closable tabs, active-state management, and accessible document-style interactions.
Requirements
HTML, CSS, JavaScript
Dependencies
None
Usage
Copy index.html, styles.css and script.js into your project.
Typography: Inter, with a system sans-serif fallback.
About Tab 10
Tab 10 is a tabs component in the Tab Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 7, 2026.
- tab
- tabs
- dynamic tabs
- closable tabs
- workspace tabs
What the code includes
HTML + CSS + JavaScript
3 files: index.html, styles.css, script.js
- Behavior is handled in script.js.
- ARIA in the markup: roles tablist, tab, tabpanel; aria-label, aria-selected, aria-controls, aria-labelledby.
- HTML elements used: button, svg.
- Keyboard keys handled: Enter, ArrowLeft, ArrowRight, Home, End.
- Includes a prefers-reduced-motion rule for its animation.
React + TypeScript + Tailwind CSS
3 files: Tab10.jsx, Tab10.types.ts, Tab10.tailwind.css
- Configurable through 7 props: tabs, activeTab, defaultActiveTab, onActiveTabChange, onClose, onAdd, className.
- Uses React hooks: useId, useLayoutEffect, useRef, useState.
- ARIA in the markup: roles tab, tablist, tabpanel; aria-label, aria-selected, aria-controls, aria-labelledby.
- HTML elements used: button, svg.
- Keyboard keys handled: Enter, ArrowLeft, ArrowRight, Home, End.
- Includes a prefers-reduced-motion rule for its animation.