Installation
Run this in a project that already uses shadcn/ui. The CLI adds the block, its components and npm dependencies.
pnpm dlx shadcn@latest add https://ui.sumansharma.info.np/r/hero-section-4.jsonPrefer to iterate with AI?Open in
Usage
The CLI writes the block to components/hero-section.tsx. Import it anywhere:
Loading...
Source
The CLI writes this component to components/hero-section.tsx.
import React from 'react'
import Link from 'next/link'
import { Button } from '@/components/ui/button'
import Image from 'next/image'
import { HeroHeader } from '@/components/hero8-header'
import { InfiniteSlider } from '@/components/motion-primitives/infinite-slider'
import { ProgressiveBlur } from '@/components/motion-primitives/progressive-blur'
export default function HeroSection() {
return (
<>
<HeroHeader />
<main className="overflow-x-hidden">
<section>
<div className="pb-24 pt-12 md:pb-32 lg:pb-56 lg:pt-44">
<div className="relative mx-auto flex max-w-6xl flex-col px-6 lg:block">
<div className="mx-auto max-w-lg text-center lg:ml-0 lg:w-1/2 lg:text-left">
<h1 className="mt-8 max-w-2xl text-balance text-5xl font-medium md:text-6xl lg:mt-16 xl:text-7xl">Ship faster with Lyra</h1>
<p className="mt-8 max-w-2xl text-pretty text-lg">Highly customizable components for building modern websites and applications that look and feel the way you mean it.</p>
<div className="mt-12 flex flex-col items-center justify-center gap-2 sm:flex-row lg:justify-start">
<Button
asChild
size="lg"
className="px-5 text-base">
<Link href="#link">
<span className="text-nowrap">Start Building</span>
</Link>
</Button>
<Button
key={2}
asChild
size="lg"
variant="ghost"
className="px-5 text-base">
<Link href="#link">
<span className="text-nowrap">Request a demo</span>
</Link>
</Button>
</div>
</div>
<Image
className="-z-10 order-first ml-auto h-56 w-full object-cover invert sm:h-96 lg:absolute lg:inset-0 lg:-right-20 lg:-top-96 lg:order-last lg:h-max lg:w-2/3 lg:object-contain dark:mix-blend-lighten dark:invert-0"
src="/images/abstract-bg.jpg"
alt="Abstract Object"
height="2400"
width="1800"
/>
</div>
</div>
</section>
<section className="bg-background pb-16 md:pb-32">
<div className="group relative m-auto max-w-6xl px-6">
<div className="flex flex-col items-center md:flex-row">
<div className="md:max-w-44 md:border-r md:pr-6">
<p className="text-end text-sm">Powering the best teams</p>
</div>
<div className="relative py-6 md:w-[calc(100%-11rem)]">
<InfiniteSlider
speedOnHover={20}
speed={40}
gap={112}>
<div className="flex">
<img
className="mx-auto h-5 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/nvidia.svg"
alt="Nvidia Logo"
height="20"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-4 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/stripe.svg"
alt="Stripe Logo"
height="16"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-4 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/github.svg"
alt="GitHub Logo"
height="16"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-5 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/nike.svg"
alt="Nike Logo"
height="20"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-5 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/lemonsqueezy.svg"
alt="Lemon Squeezy Logo"
height="20"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-4 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/laravel.svg"
alt="Laravel Logo"
height="16"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-7 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/supabase.svg"
alt="Supabase Logo"
height="28"
width="auto"
/>
</div>
<div className="flex">
<img
className="mx-auto h-6 w-fit dark:invert"
src="https://cdn.jsdelivr.net/npm/simple-icons@16.32.0/icons/anthropic.svg"
alt="Anthropic Logo"
height="24"
width="auto"
/>
</div>
</InfiniteSlider>
<div className="bg-linear-to-r from-background absolute inset-y-0 left-0 w-20"></div>
<div className="bg-linear-to-l from-background absolute inset-y-0 right-0 w-20"></div>
<ProgressiveBlur
className="pointer-events-none absolute left-0 top-0 h-full w-20"
direction="left"
blurIntensity={1}
/>
<ProgressiveBlur
className="pointer-events-none absolute right-0 top-0 h-full w-20"
direction="right"
blurIntensity={1}
/>
</div>
</div>
</div>
</section>
</main>
</>
)
}
More hero section blocks
View all 12 →- Hero Section 101Dark hero with an animated headline, announcement pill, dual CTAs, a product screenshot and a logo strip.
- Hero Section 202Centered hero with animated text, a floating header and a light/dark product screenshot.
- Hero Section 303Minimal hero with an email capture form, animated copy and a customer logo cloud.
- Hero Section 505Full-bleed video hero with a sticky header and an infinite logo slider.
- Hero Section 606Product hero with a newsletter input, announcement link and an app screenshot.
- Hero Section 707Carousel-driven hero built on Swiper, with a headline and CTA pair.