Hero

PreviousNext

A component featuring a 2-column layout, with a text section including a title, paragraph, and buttons on one side, and a full-width image on the other.

Docs
shadcnblocksblock

Preview

Loading preview…
code/block/hero34.tsx
import { ArrowRight } from "lucide-react";

import { cn } from "@/lib/utils";

import { Button } from "@/components/ui/button";

interface Hero34Props {
  className?: string;
}

const Hero34 = ({ className }: Hero34Props) => {
  return (
    <section className={cn("", className)}>
      <div className="container">
        <div className="grid items-center gap-8 bg-muted lg:grid-cols-2">
          <div className="flex flex-col items-center p-16 text-center lg:items-start lg:text-left">
            <p>New Release</p>
            <h1 className="my-6 text-4xl font-bold text-pretty lg:text-6xl">
              Welcome to Our Website
            </h1>
            <p className="mb-8 max-w-xl text-muted-foreground lg:text-xl">
              Lorem ipsum dolor sit amet consectetur adipisicing elit. Elig
              doloremque mollitia fugiat omnis! Porro facilis quo animi
              consequatur. Explicabo.
            </p>
            <div className="flex w-full flex-col justify-center gap-2 sm:flex-row lg:justify-start">
              <Button>
                Primary
                <ArrowRight className="size-4" />
              </Button>
              <Button variant="outline">Secondary</Button>
            </div>
          </div>
          <img
            src="https://deifkwefumgah.cloudfront.net/shadcnblocks/block/placeholder-1.svg"
            alt="placeholder hero"
            className="h-full w-full object-cover"
          />
        </div>
      </div>
    </section>
  );
};

export { Hero34 };

Installation

npx shadcn@latest add @shadcnblocks/hero34

Usage

import { Hero34 } from "@/components/hero34"
<Hero34 />