About this set
A dark vertical rail of icon tabs beside a content panel, for app shells, dashboards and settings screens where the navigation should take little room. It has four sections, Dashboard, Projects, Team and Analytics, each with a line icon. At rest the rail is 60 pixels wide and shows only icons; on hover, or as soon as keyboard focus enters it, it widens to 184 pixels and the labels unroll. The unrolling works by transitioning a one-column grid from 0fr to 1fr, so each label animates to its natural width without a fixed max-width. Because the rail also opens on focus-within, keyboard users see the labels as soon as they reach it. The label text is always in the page, only clipped, so screen readers get the names even when the rail is narrow. The plain CSS version is a radio group with :has(); the Bootstrap version is a vertical .nav-pills with .flex-column and aria-orientation set; the Tailwind version uses named groups and a small WAI-ARIA tabs script.
What’s included
- 60px icon rail that widens to 184px on hover and focus
- Labels unroll with a 0fr to 1fr grid transition
- Labels stay available to screen readers while clipped
- Light indigo focus outline that stands out on the dark rail
- Bootstrap vertical .nav-pills with aria-orientation
Accessibility
In the plain CSS version the tabs are a radio group, not ARIA tabs: the radios sit inside an element with role="radiogroup" and an aria-label, each takes its name from its visible label, Tab enters the group and the arrow keys move the selection (radios have no Home or End). In the Bootstrap and Tailwind versions they follow the WAI-ARIA tabs pattern: role tablist, tab and tabpanel, aria-selected, aria-controls, a roving tabindex, arrow keys plus Home and End. The Bootstrap and Tailwind tablists set aria-orientation="vertical". Keyboard focus shows a 2px light indigo outline inside the dark rail, and the widening and unrolling happen instantly under prefers-reduced-motion.
Customise it
Change the rail colour #151b2e and the widths 60px and 184px in .rail (plain CSS and Bootstrap) or --color-rail and the w-[60px] and w-[184px] utilities (Tailwind). The selected background is rgba(99,102,241,.28).


















