Hero 01
flx/hero-01FreeBlock
A centered serif hero with a soft gradient wash, pill CTA, and a floating integration cloud.
Install it
npx shadcn@latest add https://ui.flexnative.com/r/hero-01.jsonSource
1'use client'23import * as React from 'react'4import { motion, useReducedMotion, type Variants } from 'motion/react'5import Balancer from 'react-wrap-balancer'67import { cn } from '@/lib/utils'89import { Cta, type CtaProps } from '../../shared/cta'10import { IntegrationCloud } from './integration-cloud'1112export interface Hero01Props {13 title: string14 titleLine2?: string15 description: string16 washImage: string17 animation?: 'none' | 'subtle'18 primaryCTA: CtaProps19 integrationRows: string[][]20 variant?: 'standard' | 'compact'21}2223const variantStyles = {24 standard: {25 section: 'py-20 sm:py-28',26 title: 'text-3xl sm:text-4xl md:text-5xl',27 description: 'max-w-md text-sm sm:text-base',28 content: 'gap-8',29 },30 compact: {31 section: 'py-14 sm:py-20',32 title: 'text-2xl sm:text-3xl md:text-4xl',33 description: 'max-w-sm text-sm',34 content: 'gap-6',35 },36} as const3738const container: Variants = {39 hidden: {},40 visible: { transition: { staggerChildren: 0.1, delayChildren: 0.05 } },41}4243const item: Variants = {44 hidden: { opacity: 0, y: 12, filter: 'blur(6px)' },45 visible: {46 opacity: 1,47 y: 0,48 filter: 'blur(0px)',49 transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] },50 },51}5253function Reveal({54 active,55 className,56 children,57}: Readonly<{58 active: boolean59 className?: string60 children: React.ReactNode61}>) {62 if (!active) return <div className={className}>{children}</div>6364 return (65 <motion.div variants={item} className={className}>66 {children}67 </motion.div>68 )69}7071export function Hero01({72 title,73 titleLine2,74 description,75 washImage,76 animation = 'none',77 primaryCTA,78 integrationRows,79 variant = 'standard',80}: Readonly<Hero01Props>) {81 const reduce = useReducedMotion()82 const animate = animation === 'subtle' && !reduce83 const vs = variantStyles[variant]8485 const backgroundElement = washImage && (86 <div87 aria-hidden88 className="pointer-events-none absolute inset-x-0 top-0 z-0 mx-auto h-full w-full mask-t-from-60% mask-t-to-90% mask-b-from-75% mask-b-to-85% mask-radial-[70%_70%] mask-radial-from-60% mask-radial-to-90% mask-radial-at-top opacity-50 md:mask-radial-[70%_90%] dark:opacity-10"89 >90 <img91 src={washImage}92 alt=""93 className="absolute inset-0 size-full object-cover object-top"94 />95 <div className="bg-background/30 dark:bg-background/45 absolute inset-0" />96 </div>97 )9899 const titleElement = title && (100 <h1101// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from flx
All 446 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Basicaccordion-01 | flx | Blocks | Free | no deps | |
| Multipleaccordion-02 | flx | Blocks | Free | no deps | |
| With iconsaccordion-03 | flx | Blocks | Free | no deps | |
| FAQaccordion-04 | flx | Blocks | Free | no deps | |
| Separated cardsaccordion-05 | flx | Blocks | Free | no deps | |
| Plus / minus iconaccordion-06 | flx | Blocks | Free | 1 dep | |
| Left chevronaccordion-07 | flx | Blocks | Free | 1 dep | |
| Rich contentaccordion-09 | flx | Blocks | Free | no deps |
