Layout 597
edge_to_edge1 ColumnImage/Video BottomText Align CenterVideo Lightbox

Code
relume-layout597.tsx
"use client";
import { useState } from "react";
import clsx from "clsx";
import { Button, type ButtonProps } from "@/components/ui/button";
import { Dialog, DialogContent, DialogTrigger } from "@/components/ui/dialog";
import { ChevronRight, PlayCircle, ProgressActivity, RelumeIcon } from "relume-icons";
type ImageProps = {
src: string;
alt?: string;
};
type Props = {
tagline: string;
heading: string;
description: string;
logos: ImageProps[];
buttons: ButtonProps[];
video: string;
image: ImageProps;
};
export type Layout597Props = React.ComponentPropsWithoutRef<"section"> & Partial<Props>;
export const Layout597 = (props: Layout597Props) => {
const [isIframeLoaded, setIsIframeLoaded] = useState(false);
const { tagline, heading, description, logos, buttons, video, image } = {
...Layout597Defaults,
...props,
};
return (
<section>
<div className="px-[5%] py-16 md:py-24 lg:py-28">
<div className="container max-w-lg text-center">
<p className="mb-3 font-semibold md:mb-4">{tagline}</p>
<h2 className="mb-5 text-h2 font-bold md:mb-6">{heading}</h2>
<p className="text-medium">{description}</p>
<div className="mt-5 flex flex-wrap items-center justify-center gap-x-8 gap-y-6 py-2 md:mt-6">
{logos.map((logo, index) => (
<img key={index} src={logo.src} alt={logo.alt} className="max-h-14" />
))}
</div>
<div className="mt-6 flex items-center justify-center gap-x-4 md:mt-8">
{buttons.map((button, index) => (
<Button key={index} {...button}>
{button.title}
</Button>
))}
</div>
</div>
</div>
<Dialog>
<DialogTrigger asChild>
<button className="relative flex w-full max-w-full items-center justify-center overflow-hidden">
<img src={image.src} className="aspect-video size-full object-cover" alt={image.alt} />
<PlayCircle className="absolute z-20 size-20 text-white" />
<span className="absolute inset-0 z-10 bg-neutral-darkest/50" />
</button>
</DialogTrigger>
<DialogContent>
{!isIframeLoaded && (
<ProgressActivity className="mx-auto size-16 animate-spin text-white" />
)}
<iframe
className={clsx("z-0 mx-auto aspect-video size-full md:w-[738px] lg:w-[940px]", {
visible: isIframeLoaded,
hidden: !isIframeLoaded,
})}
src={video}
allow="autoplay; encrypted-media; picture-in-picture"
allowFullScreen
onLoad={() => setIsIframeLoaded(true)}
></iframe>
</DialogContent>
</Dialog>
</section>
);
};
export const Layout597Defaults: Props = {
tagline: "Tagline",
heading: "Medium length section heading goes here",
description:
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat.",
logos: [
{ src: "https://d22po4pjz3o32e.cloudfront.net/webflow-logo.svg", alt: "Webflow logo 1" },
{ src: "https://d22po4pjz3o32e.cloudfront.net/relume-logo.svg", alt: "Relume logo 1" },
{ src: "https://d22po4pjz3o32e.cloudfront.net/webflow-logo.svg", alt: "Webflow logo 2" },
{ src: "https://d22po4pjz3o32e.cloudfront.net/relume-logo.svg", alt: "Relume logo 2" },
],
buttons: [
{ title: "Button", variant: "secondary" },
{
title: "Button",
variant: "link",
size: "link",
iconRight: <ChevronRight />,
},
],
video: "https://www.youtube.com/embed/8DKLYsikxTs?si=Ch9W0KrDWWUiCMMW",
image: {
src: "https://d22po4pjz3o32e.cloudfront.net/placeholder-video-thumbnail.svg",
alt: "Relume placeholder image",
},
};npm i @radix-ui/react-dialog @radix-ui/react-slot class-variance-authority@0.7.1 clsx@^2.1.1 relume-icons@1.3.0 tailwind-merge@^2.2.2


