"use client"; import { useId, type CSSProperties, type ElementType, type ReactNode } from "react"; import { motion, useReducedMotion } from "motion/react"; export type FeatureBentoItem = { title: string; text: string; /** A picture or small live demo at the top of the tile. Position it absolute to fill. */ media?: ReactNode; /** small = 2 of 6 columns, wide = 4 columns, tall = 2 columns and 2 rows, full = 6 columns. */ size?: "small" | "wide" | "tall" | "full"; /** Makes the whole tile a link. */ href?: string; }; type FeatureBentoProps = { items: FeatureBentoItem[]; title?: string; /** Small line above the title. */ eyebrow?: string; subtitle?: string; /** Tile colour. */ tile?: string; /** Tile edge colour on hover. */ color?: string; /** h2 by default. */ headingAs?: ElementType; /** Set padding and colours here. */ className?: string; }; const SIZES = { small: "@3xl:col-span-2", wide: "@3xl:col-span-4", tall: "@3xl:col-span-2 @3xl:row-span-2", full: "@3xl:col-span-6", }; /* FeatureBento: tiles of mixed sizes on a 6-column grid. They rise in on scroll; on hover the tile lifts and its media grows. One column when narrow. */ export function FeatureBento({ items, title, eyebrow, subtitle, tile = "#15122a", color = "#a78bfa", headingAs: Heading = "h2", className = "bg-[#0b0a14] px-5 py-16 text-white", }: FeatureBentoProps) { const reduce = useReducedMotion(); const id = useId(); return (
{title && (
{eyebrow &&

{eyebrow}

} {title} {subtitle &&

{subtitle}

}
)}
); }