Select 08
A hierarchical category select with one-level structured navigation, responsive indentation, and accessible option selection.
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 Select 08
Select 08 is a select component in the Select Components collection, available in HTML + CSS + JavaScript and React + TypeScript + Tailwind CSS. Last updated September 8, 2026.
- select
- hierarchical select
- category select
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 listbox, group, option; aria-haspopup, aria-expanded, aria-controls, aria-label, aria-labelledby, aria-selected.
- HTML elements used: button, label, svg.
- Keyboard keys handled: Escape, Enter, ArrowUp, ArrowDown, Home, End.
- Includes a prefers-reduced-motion rule for its animation.
React + TypeScript + Tailwind CSS
3 files: Select08.jsx, Select08.types.ts, Select08.tailwind.css
- Configurable through 8 props: label, categories, value, defaultValue, onValueChange, placeholder, defaultOpen, className.
- Uses React hooks: useId, useLayoutEffect, useRef, useState.
- ARIA in the markup: roles group, listbox, option; aria-haspopup, aria-expanded, aria-controls, aria-label, aria-labelledby, aria-selected.
- HTML elements used: button, label, svg.
- Keyboard keys handled: Escape, Enter, ArrowUp, ArrowDown, Home, End.
- Includes a prefers-reduced-motion rule for its animation.