feature108

Free
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@radix-ui/react-tabs";
import { Layout, Pointer, Zap } from "lucide-react";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";
interface TabContent {
badge: string;
title: string;
description: string;
buttonText: string;
imageSrc: string;
imageAlt: string;
}
interface Tab {
value: string;
icon: React.ReactNode;
label: string;
content: TabContent;
}
interface Feature108Props {
badge?: string;
heading?: string;
description?: string;
tabs?: Tab[];
}
const Feature108 = ({
badge = "shadcnblocks.com",
heading = "A Collection of Components Built With Shadcn & Tailwind",
description = "Join us to build flawless web solutions.",
tabs = [
{
value: "tab-1",
icon: <Zap className="h-auto w-4 shrink-0" />,
label: "Boost Revenue",
content: {
badge: "Modern Tactics",
title: "Make your site a true standout.",
description:
"Discover new web trends that help you craft sleek, highly functional sites that drive traffic and convert leads into customers.",
buttonText: "See Plans",
imageSrc:
"https://shadcnblocks.com/images/block/placeholder-dark-1.svg",
imageAlt: "placeholder",
},
},
{
value: "tab-2",
icon: <Pointer className="h-auto w-4 shrink-0" />,
label: "Higher Engagement",
content: {
badge: "Expert Features",
title: "Boost your site with top-tier design.",
description:
"Use stellar design to easily engage users and strengthen their loyalty. Create a seamless experience that keeps them coming back for more.",
buttonText: "See Tools",
imageSrc:
"https://shadcnblocks.com/images/block/placeholder-dark-2.svg",
imageAlt: "placeholder",
},
},
{
value: "tab-3",
icon: <Layout className="h-auto w-4 shrink-0" />,
label: "Stunning Layouts",
content: {
badge: "Elite Solutions",
title: "Build an advanced web experience.",
description:
"Lift your brand with modern tech that grabs attention and drives action. Create a digital experience that stands out from the crowd.",
buttonText: "See Options",
imageSrc:
"https://shadcnblocks.com/images/block/placeholder-dark-3.svg",
imageAlt: "placeholder",
},
},
],
}: Feature108Props) => {
return (
<section className="py-32">
<div className="container mx-auto">
<div className="flex flex-col items-center gap-4 text-center">
<Badge variant="outline">{badge}</Badge>
<h1 className="max-w-2xl text-3xl font-semibold md:text-4xl">
{heading}
</h1>
<p className="text-muted-foreground">{description}</p>
</div>
<Tabs defaultValue={tabs[0].value} className="mt-8">
<TabsList className="container flex flex-col items-center justify-center gap-4 sm:flex-row md:gap-10">
{tabs.map((tab) => (
<TabsTrigger
key={tab.value}
value={tab.value}
className="flex items-center gap-2 rounded-xl px-4 py-3 text-sm font-semibold text-muted-foreground data-[state=active]:bg-muted data-[state=active]:text-primary"
>
{tab.icon} {tab.label}
</TabsTrigger>
))}
</TabsList>
<div className="mx-auto mt-8 max-w-screen-xl rounded-2xl bg-muted/70 p-6 lg:p-16">
{tabs.map((tab) => (
<TabsContent
key={tab.value}
value={tab.value}
className="grid place-items-center gap-20 lg:grid-cols-2 lg:gap-10"
>
<div className="flex flex-col gap-5">
<Badge variant="outline" className="w-fit bg-background">
{tab.content.badge}
</Badge>
<h3 className="text-3xl font-semibold lg:text-5xl">
{tab.content.title}
</h3>
<p className="text-muted-foreground lg:text-lg">
{tab.content.description}
</p>
<Button className="mt-2.5 w-fit gap-2" size="lg">
{tab.content.buttonText}
</Button>
</div>
<img
src={tab.content.imageSrc}
alt={tab.content.imageAlt}
className="rounded-xl"
/>
</TabsContent>
))}
</div>
</Tabs>
</div>
</section>
);
};
export { Feature108 };