Hero 5
uifoundry/hero-5UnverifiedBlock
Hero section with animated FlickeringGrid background, alert banner, and dual CTAs
Install it
npx shadcn@latest add https://raw.githubusercontent.com/UIFoundry/uifoundry/master/hero-5.jsonSource
1"use client";23import Link from "next/link";4import { ArrowDown, ArrowRight } from "lucide-react";5import { Button } from "@/registry/ui/button";6import { TextEffect } from "@/registry/ui/motion-primitives/text-effect";7import { AnimatedGroup } from "@/registry/ui/motion-primitives/animated-group";8import type { Hero_5_Block } from "~/payload-types";9import { cn } from "@/registry/default/utils";10import MediaField from "@/registry/default/lib/fields/media/index";11import FlickeringGrid from "@/registry/ui/motion-primitives/flickering-grid";1213const transitionVariants = {14 item: {15 hidden: {16 opacity: 0,17 filter: "blur(12px)",18 y: 12,19 },20 visible: {21 opacity: 1,22 filter: "blur(0px)",23 y: 0,24 transition: {25 type: "spring",26 bounce: 0.3,27 duration: 1.5,28 },29 },30 },31};3233export default function HeroSection(props: Hero_5_Block) {34 return (35 <div className="overflow-hidden">36 <section>37 <div className="relative min-h-[90vh]">38 {/* FlickeringGrid Background */}39 <div className="absolute inset-0 -z-10 overflow-hidden">40 <FlickeringGrid41 className="absolute inset-0 z-0 [mask-image:radial-gradient(450px_circle_at_center,white,transparent)]"42 squareSize={4}43 gridGap={6}44 color="#60A5FA"45 maxOpacity={0.5}46 flickerChance={0.1}47 height={800}48 width={800}49 />50 </div>5152 <AnimatedGroup53 variants={{54 container: {55 visible: {56 transition: {57 delayChildren: 1,58 },59 },60 },61 item: {62 hidden: {63 opacity: 0,64 y: 20,65 },66 visible: {67 opacity: 1,68 y: 0,69 transition: {70 type: "spring",71 bounce: 0.3,72 duration: 2,73 },74 },75 },76 }}77 className="absolute inset-0 -z-20"78 >79 {/* Optional background media */}80 </AnimatedGroup>81 <div className="absolute inset-0 -z-10 size-full [background:radial-gradient(125%_125%_at_50%_100%,transparent_0%,var(--color-background)_75%)]"></div>82 <div className="mx-auto max-w-7xl px-6">83 <div className="text-center sm:mx-auto lg:mt-0 lg:mr-auto">84 {props.alertLink && (85 <AnimatedGroup86 // @ts-expect-error mismatch anim group variants type87 variants={transitionVariants}88 className={cn(89 (!props.alertLabel || !props.alertLink) && "hidden",90 )}91 >92 <Link93// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from uifoundry
All 54 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Color Fieldcolor-field | uifoundry | Blocks | Unverified | 4 deps · 2 files | |
| Coming Soon 1coming-soon-1 | uifoundry | Blocks | Unverified | 3 deps · 2 files | |
| CTA 1cta-1 | uifoundry | Blocks | Unverified | 3 deps · 2 files | |
| CTA 2cta-2 | uifoundry | Blocks | Unverified | 3 deps · 2 files | |
| CTA 3cta-3 | uifoundry | Blocks | Unverified | 3 deps · 2 files | |
| Custom Headercustom-header | uifoundry | Blocks | Unverified | 4 deps · 3 files | |
| Features 1features-1 | uifoundry | Blocks | Unverified | 3 deps · 2 files | |
| Features 2features-2 | uifoundry | Blocks | Unverified | 4 deps · 2 files |
