Tabs with a sliding line
The line slides to the chosen tab, and the text and photo follow.
UniversalUsed in production
Install
npx finepieces add tabs-sliding-lineOr with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/tabs-sliding-line.jsonClick a tab
example.tsx
import { TabsSlidingLine } from "@/components/fine-pieces/tabs-sliding-line";
export default function Example() {
return (
<TabsSlidingLine
tabs={[
{ label: "Beans", title: "From the farm, not the market", text: "We buy directly from three farmers in Ethiopia and Colombia.", image: "/images/cafe-1.webp" },
{ label: "Brewing", title: "Slow and precise", text: "Every cup is weighed and timed.", image: "/images/cafe-3.webp" },
{ label: "Subscription", title: "Fresh to your door every month", text: "Two bags a month, cancel whenever you like.", image: "/images/eten-2.webp" },
]}
/>
);
}