Hero 05
flx/hero-05FreeBlock
An editorial hero with a left tagline, right-aligned headline and copy, and a full-width image below.
Install it
npx shadcn@latest add https://ui.flexnative.com/r/hero-05.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'1011export interface Hero05Props {12 tagline: string13 title: string14 description: string15 landscapeImage: string16 landscapeAlt?: string17 animation?: 'none' | 'subtle'18 primaryCTA?: CtaProps19 secondaryCTA?: CtaProps20 variant?: 'standard' | 'compact'21}2223const variantStyles = {24 standard: {25 copy: 'pt-20 pb-10 sm:pt-28 sm:pb-12 lg:pt-32',26 tagline: 'text-sm sm:text-base',27 title: 'text-3xl sm:text-4xl md:text-5xl',28 description: 'text-sm sm:text-base',29 header: 'gap-6 sm:gap-8',30 grid: 'gap-10',31 },32 compact: {33 copy: 'pt-14 pb-8 sm:pt-20 sm:pb-10 lg:pt-24',34 tagline: 'text-sm',35 title: 'text-2xl sm:text-3xl md:text-4xl',36 description: 'text-sm',37 header: 'gap-4 sm:gap-5',38 grid: 'gap-8',39 },40} as const4142const container: Variants = {43 hidden: {},44 visible: { transition: { staggerChildren: 0.1, delayChildren: 0.05 } },45}4647const item: Variants = {48 hidden: { opacity: 0, y: 12, filter: 'blur(6px)' },49 visible: {50 opacity: 1,51 y: 0,52 filter: 'blur(0px)',53 transition: { duration: 0.28, ease: [0.22, 1, 0.36, 1] },54 },55}5657const mediaItem: Variants = {58 hidden: { opacity: 0, y: 20, filter: 'blur(8px)' },59 visible: {60 opacity: 1,61 y: 0,62 filter: 'blur(0px)',63 transition: { duration: 0.32, ease: [0.22, 1, 0.36, 1] },64 },65}6667function Reveal({68 active,69 variants,70 className,71 children,72}: Readonly<{73 active: boolean74 variants?: Variants75 className?: string76 children: React.ReactNode77}>) {78 if (!active) return <div className={className}>{children}</div>7980 return (81 <motion.div variants={variants ?? item} className={className}>82 {children}83 </motion.div>84 )85}8687export function Hero05({88 tagline,89 title,90 description,91 landscapeImage,92 landscapeAlt = '',93 animation = 'none',94 primaryCTA,95 secondaryCTA,96 variant = 'standard',97}: Readonly<Hero05Props>) {98 const reduce = useReducedMotion()99 const animate = animation === 'subtle' && !reduce100 const vs = variantStyles[variant]101102 const taglineElement = tagline && (103 <p104 className={cn(105 'text-muted-foreground max-w-xs leading-relaxed tracking-tight',106 vs.tagline,107 )}108 >109 <Balancer>{tagline}</Balancer>110 </p>111 )112113// … 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 |
