About this set
A dark 66px icon rail for app layouts that widens to 222px when a pointer rests on it or keyboard focus enters it, unrolling a text label beside every icon. It holds a brand mark, four main links (Dashboard, Projects, Team, Analytics) and Settings pinned to the bottom with margin-top:auto, and the current page gets an indigo-tinted background. Use it for dashboards and internal tools where screen space matters and people learn the icons quickly. The labels animate with a grid technique: each label sits in a one-column grid whose track goes from 0fr to 1fr, so the text slides out smoothly without measuring widths or animating max-width. Because the labels stay in the DOM the whole time, every link keeps its accessible name while the rail is collapsed. The rail opens on :hover and on :focus-within, so tabbing into it expands it too, and there is no JavaScript. On touch screens the rail stays collapsed and the icons remain working, named links. The Bootstrap version is a vertical .nav with .nav-link items.
What’s included
- 66px rail that expands to 222px on hover or keyboard focus
- Labels unroll with a 0fr to 1fr grid column, no JavaScript
- Accessible names kept while collapsed
- Settings pinned to the bottom with margin-top:auto
- Bootstrap version uses a vertical .nav
Accessibility
The rail is a list of links in a nav labelled Main, with aria-current="page" on the current one. Icons are aria-hidden and every link is named by its label, which stays in the DOM when collapsed. Keyboard focus expands the rail through :focus-within and shows a light indigo outline. The width and label transitions switch off under prefers-reduced-motion.
Customise it
Change --rail-bg, --rail-text, --rail-accent and --rail-focus on .rail, and the 66px and 222px widths. In Bootstrap the link colours are --bs-nav-link-color and --bs-nav-link-hover-color on .rail .nav; in Tailwind edit w-[66px], hover:w-[222px] and focus-within:w-[222px].




















