jaecoo-kelapagading/components/landing-page/interior.tsx

137 lines
4.2 KiB
TypeScript
Raw Normal View History

2025-07-14 07:31:51 +00:00
"use client";
import Image from "next/image";
import { motion } from "framer-motion";
import { useInView } from "react-intersection-observer";
const features = [
{
title: "14.8 Screen with APPLE Carplay & Android Auto",
description:
"Stay connected and informed with a 14.8 display offering clear visuals and advanced functionality for a seamless driving experience.",
2025-10-23 12:15:13 +00:00
image: "/j5-fitur2.jpg",
2025-07-14 07:31:51 +00:00
},
{
2025-10-23 12:15:13 +00:00
title: "",
description: "",
image: "/j5-fitur3.jpg",
2025-07-14 07:31:51 +00:00
},
{
2025-10-23 12:15:13 +00:00
title: "",
description: "",
image: "/j5-fitur4.jpg",
2025-07-14 07:31:51 +00:00
},
{
title: "Wireless Charging",
description:
"Stay powered up on the go with Wireless Charging, ensuring your devices are always ready when you are.",
2025-10-23 12:15:13 +00:00
image: "/j5-fitur7.png",
2025-07-14 07:31:51 +00:00
},
];
const interior = [
{
2025-10-23 12:15:13 +00:00
title: "",
description: "",
image: "/j5-fitur8.jpg",
2025-07-14 07:31:51 +00:00
},
{
2025-10-23 12:15:13 +00:00
title: "",
description: "",
image: "/j5-fitur6.jpeg",
2025-07-14 07:31:51 +00:00
},
{
title: "Sony 8-Speaker Audio system",
description:
"Immerse yourself in rich, high-quality sound with the Sony 8-speaker audio system, delivering an exceptional listening experience on every journey.",
2025-10-23 12:15:13 +00:00
image: "/j5-fitur5.jpg",
2025-07-14 07:31:51 +00:00
},
];
export default function Interior() {
const { ref, inView } = useInView({ triggerOnce: true, threshold: 0.2 });
return (
<section className="py-10 px-4 sm:px-6 md:px-20 bg-white" ref={ref}>
<motion.h2
className="text-2xl mt-5 mb-8"
initial={{ opacity: 0, y: 30 }}
animate={inView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6 }}
>
2026-01-18 17:01:09 +00:00
<span className="text-[#1F6779] font-semibold">Jaecoo 7 SHS-P</span>{" "}
Fitur
2025-07-14 07:31:51 +00:00
</motion.h2>
<motion.div
className="relative w-full h-[300px] sm:h-[400px] md:h-[600px]"
initial={{ opacity: 0, scale: 0.95 }}
animate={inView ? { opacity: 1, scale: 1 } : {}}
transition={{ duration: 0.7 }}
>
<Image
2025-10-23 12:15:13 +00:00
src="/j5-fitur1.jpg"
2025-07-14 07:31:51 +00:00
alt="Interior Hero"
fill
className="object-cover"
sizes="100vw"
/>
</motion.div>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-4 gap-2 sm:gap-4 mt-5">
{features.map((item, index) => (
<motion.div
key={index}
className="relative aspect-[4/3] overflow-hidden group"
initial={{ opacity: 0, y: 20 }}
animate={inView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.4, delay: index * 0.1 }}
>
<Image
src={item.image}
alt={item.title}
fill
className="object-cover group-hover:scale-105 transition-transform duration-300"
sizes="(max-width: 768px) 100vw, 25vw"
/>
<div className="absolute bottom-0 bg-gradient-to-t from-black/80 to-transparent p-4">
<h3 className="text-sm sm:text-base font-bold text-white">
{item.title}
</h3>
<p className="text-xs sm:text-sm text-gray-300 mt-1">
{item.description}
</p>
</div>
</motion.div>
))}
</div>
<div className="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-2 sm:gap-4 mt-5">
{interior.map((item, index) => (
<motion.div
key={index}
className="relative aspect-[2/1] overflow-hidden group"
initial={{ opacity: 0, y: 20 }}
animate={inView ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.4, delay: index * 0.1 }}
>
<Image
src={item.image}
alt={item.title}
fill
className="object-cover group-hover:scale-105 transition-transform duration-300"
sizes="(max-width: 768px) 100vw, 25vw"
/>
<div className="absolute bottom-0 bg-gradient-to-t from-black/80 to-transparent p-4">
<h3 className="text-sm sm:text-base font-bold text-white">
{item.title}
</h3>
<p className="text-xs sm:text-sm text-gray-300 mt-1">
{item.description}
</p>
</div>
</motion.div>
))}
</div>
</section>
);
}