Report a problem or share feedback← Catalog
Expanding Icon Tabs
curatedfreemicrokit/expanding-icon-tabs
An icon bar where the chosen tab widens to reveal its label and the rest of the row slides over to make room.
$
npx shadcn@latest add https://microkit.co/r/expanding-icon-tabs.jsonnpm deps: lucide-react
Our notes
Icon toolbar whose chosen item widens to show its label while siblings slide over; ←/→ move focus, Escape and outside-click collapse it, role=toolbar, motion-reduce handled. Good for compact app toolbars and view switchers. Hard-coded items and light-dark() hex colours — rebuild with your icons and tokens.- Source
- MicroKit
- Kind
- component
- Categories
- tabs, navigation
- Use as
- recipe — technique you apply to your own markup
- Applies to
- tabsnavigationbutton
- Motion
- on state · subtle · css · low cost · respects reduced motion
- Tags
- css, click, toolbar, hard-coded-colours
- Licence
- MIT ("MIT License — Copyright (c) 2026 Henrique Barone", github.com/henriquegpb/microkit). README credits note that some interactions are adapted from publicly shared examples and Webflow exports.
- Live demo
- microkit.co
- Docs
- microkit.co
Similar
Compare all 4 →- Clerk: User Buttonmotion/clerk-user-buttonA custom Clerk user button built with Motion. The closed avatar expands into an account menu, using Motion's resize() util to animate the container to the menu's measured height.
- Sliding Underline Tabsmicrokit/sliding-underline-tabsCSS-only: one bar translated under the active label (750ms ease-out) plus a 650ms keyframe nudge on the panel; motion-reduce handled. A prop-less demo — 3 hard-coded tabs, #f97316 bar, light-dark() hex greys, and the active label is text-white, which vanishes on a light background. Lift the technique onto your own tabs with bg-primary / text-foreground.
- Shared layout animationmotion/shared-layout-animationShared-element layoutId: a tab underline / pill that glides between items. The free, hand-rolled way to animate tabs, nav highlights and segmented controls — about 10 lines with `layoutId`. Free example (motion is MIT); copy and adapt the source from the example page.