NV-03Navigation
Swipe Tabs
Tabs with a swipeable panel, a drag-tracked indicator and spring physics.
PRODocs Search and more like it are in Kokonut UI Pro
Installation
Swipe Tabs is a free, open-source React component in the Kokonut UI Navigation collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/smooth-tab.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/smooth-tabOr add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/smooth-tab.tsx.
npm install motion lucide-reactUsage
import SmoothTab from "@/components/kokonutui/smooth-tab";
export default function Example() {
return <SmoothTab />;
}Props
itemsSwipeTabItem[]Default built-indefaultTabIdstringvaluestringThe selected tab id, for a controlled tab. Pair it with onChange.
onChange(tabId: string) => voidclassNamestringExtra classes for the root element.
activeColorstringDefault "bg-zinc-900 dark:bg-zinc-100"Background classes for the indicator: the one accent.
activeTextColorstringDefault "text-white dark:text-zinc-900"Text color classes for the label sitting on the indicator.
labelstringDefault "Sections"Accessible name for the tab list.
SwipeTabItem
idrequiredstringtitlerequiredstringiconLucideIconShown before the title in the tab.
contentReactNodeThe panel shown for this tab.
Dependencies
| Needs | Version | Comes from |
|---|---|---|
motion | ^12.23.25 | npm, installed by the CLI |
lucide-react | ^0.556.0 | npm, installed by the CLI |
cn from lib/utils.ts | shadcn init | |
| React | 19 | Your app |
| Tailwind CSS | 4 | Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.

