feat: redesign benefits section with image cards
- Replaced icon-based feature cards with new image-based card layout using product benefit images - Updated grid layout to 7-column system with asymmetric card sizes for better visual hierarchy - Added hover effects with cyan highlights and scale transitions for better interactivity - Implemented responsive design with custom rounded corners for mobile/desktop views - Removed unused FeatureCard, FeatureTitle and FeatureDescription components - Adde
This commit is contained in:
		
							
								
								
									
										77
									
								
								src/components/magicui/bento-grid.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								src/components/magicui/bento-grid.tsx
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
import type { ReactNode } from "react";
 | 
			
		||||
import { Button } from "@/components/ui/button";
 | 
			
		||||
import { ArrowRightIcon } from "@radix-ui/react-icons";
 | 
			
		||||
import { cn } from "@/lib/utils";
 | 
			
		||||
 | 
			
		||||
const BentoGrid = ({
 | 
			
		||||
  children,
 | 
			
		||||
  className,
 | 
			
		||||
}: {
 | 
			
		||||
  children: ReactNode;
 | 
			
		||||
  className?: string;
 | 
			
		||||
}) => {
 | 
			
		||||
  return (
 | 
			
		||||
    <div
 | 
			
		||||
      className={cn(
 | 
			
		||||
        "grid w-full auto-rows-[22rem] grid-cols-3 gap-4",
 | 
			
		||||
        className,
 | 
			
		||||
      )}
 | 
			
		||||
    >
 | 
			
		||||
      {children}
 | 
			
		||||
    </div>
 | 
			
		||||
  );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const BentoCard = ({
 | 
			
		||||
  name,
 | 
			
		||||
  className,
 | 
			
		||||
  background,
 | 
			
		||||
  Icon,
 | 
			
		||||
  description,
 | 
			
		||||
  href,
 | 
			
		||||
  cta,
 | 
			
		||||
}: {
 | 
			
		||||
  name: string;
 | 
			
		||||
  className: string;
 | 
			
		||||
  background: ReactNode;
 | 
			
		||||
  Icon: any;
 | 
			
		||||
  description: string;
 | 
			
		||||
  href: string;
 | 
			
		||||
  cta: string;
 | 
			
		||||
}) => (
 | 
			
		||||
  <div
 | 
			
		||||
    key={name}
 | 
			
		||||
    className={cn(
 | 
			
		||||
      "group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl",
 | 
			
		||||
      // light styles
 | 
			
		||||
      "bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]",
 | 
			
		||||
      // dark styles
 | 
			
		||||
      "transform-gpu dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
 | 
			
		||||
      className,
 | 
			
		||||
    )}
 | 
			
		||||
  >
 | 
			
		||||
    <div>{background}</div>
 | 
			
		||||
    <div className="pointer-events-none z-10 flex transform-gpu flex-col gap-1 p-6 transition-all duration-300 group-hover:-translate-y-10">
 | 
			
		||||
      <Icon className="h-12 w-12 origin-left transform-gpu text-neutral-700 -translate-y-12 transition-all duration-300 ease-in-out group-hover:scale-75 group-hover:text-sky-700" />
 | 
			
		||||
      <h3 className="text-xl font-semibold text-neutral-700 dark:text-neutral-300">
 | 
			
		||||
        {name}
 | 
			
		||||
      </h3>
 | 
			
		||||
      <p className="max-w-lg text-neutral-400">{description}</p>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <div
 | 
			
		||||
      className={cn(
 | 
			
		||||
        "pointer-events-none absolute bottom-0 flex w-full translate-y-10 transform-gpu flex-row items-center p-4 opacity-0 transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100",
 | 
			
		||||
      )}
 | 
			
		||||
    >
 | 
			
		||||
      <Button variant="ghost" asChild size="sm" className="pointer-events-auto">
 | 
			
		||||
        <a href={href}>
 | 
			
		||||
          {cta}
 | 
			
		||||
          <ArrowRightIcon className="ml-2 h-4 w-4" />
 | 
			
		||||
        </a>
 | 
			
		||||
      </Button>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
export { BentoCard, BentoGrid };
 | 
			
		||||
		Reference in New Issue
	
	Block a user