Blocks

Layout 40

background
1 ColumnText Align LeftImage/Video CenterBackground VideoAbout SectionEcommerce Product Section
Layout 40

Code

relume-layout40.tsx
type Props = {
  heading: string;
  description: string;
  video: string;
  videoType: string;
};

export type Layout40Props = React.ComponentPropsWithoutRef<"section"> & Partial<Props>;

export const Layout40 = (props: Layout40Props) => {
  const { heading, description, video, videoType } = {
    ...Layout40Defaults,
    ...props,
  };
  return (
    <section className="relative px-[5%] py-16 md:py-24 lg:py-28">
      <div className="relative z-10 container">
        <div className="w-full max-w-md">
          <h3 className="mb-5 text-h3 font-bold text-white md:mb-6">{heading}</h3>
          <p className="text-medium text-white">{description}</p>
        </div>
      </div>
      <div className="absolute inset-0 z-0">
        <video className="absolute inset-0 aspect-video size-full object-cover" autoPlay loop muted>
          <source src={video} type={videoType} />
        </video>
        <div className="absolute inset-0 bg-neutral-darkest/50" />
      </div>
    </section>
  );
};

export const Layout40Defaults: Props = {
  heading: "Long heading is what you see here in this feature section",
  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.",
  video: "https://d22po4pjz3o32e.cloudfront.net/placeholder-video.mp4",
  videoType: "video/mp4",
};

npm i @radix-ui/react-slot class-variance-authority@0.7.1 clsx@^2.1.1 relume-icons@1.3.0 tailwind-merge@^2.2.2