Hero 06
flx/hero-06FreeBlock
A split product hero with dual CTA, a compact logo row, and the Spot 01 illustration.
Install it
npx shadcn@latest add https://ui.flexnative.com/r/hero-06.jsonSource
1'use client'23import * as React from 'react'4import { motion, useReducedMotion, type Variants } from 'motion/react'5import Balancer from 'react-wrap-balancer'67import type { CtaProps } from '../../shared/cta'8import { Cta } from '../../shared/cta'9import { Spot01 } from '../../../illustrations/spot/spot-01'1011export interface Hero06Props {12 title: string13 highlight?: string14 description: string15 animation?: 'none' | 'subtle'16 primaryCTA: CtaProps17 secondaryCTA?: CtaProps18 logos: string[]19 logosLabel?: string20}2122const container: Variants = {23 hidden: {},24 visible: { transition: { staggerChildren: 0.1, delayChildren: 0.05 } },25}2627const item: Variants = {28 hidden: { opacity: 0, y: 12, filter: 'blur(6px)' },29 visible: {30 opacity: 1,31 y: 0,32 filter: 'blur(0px)',33 transition: { duration: 0.5, ease: [0.22, 1, 0.36, 1] },34 },35}3637function Reveal({38 active,39 className,40 children,41}: Readonly<{42 active: boolean43 className?: string44 children: React.ReactNode45}>) {46 if (!active) return <div className={className}>{children}</div>4748 return (49 <motion.div variants={item} className={className}>50 {children}51 </motion.div>52 )53}5455export function Hero06({56 title,57 highlight,58 description,59 animation = 'none',60 primaryCTA,61 secondaryCTA,62 logos = [],63 logosLabel,64}: Readonly<Hero06Props>) {65 const reduce = useReducedMotion()66 const animate = animation === 'subtle' && !reduce6768 const titleElement = title && (69 <h1 className="text-foreground font-serif text-2xl font-normal tracking-tight text-balance sm:text-3xl md:text-4xl">70 <Balancer>{title}</Balancer>71 {highlight && (72 <>73 {' '}74 <span className="text-muted-foreground">{highlight}</span>75 </>76 )}77 </h1>78 )7980 const descriptionElement = description && (81 <p className="text-muted-foreground max-w-md text-base sm:text-lg">82 <Balancer>{description}</Balancer>83 </p>84 )8586 const ctasElement = (primaryCTA?.ctaEnabled || secondaryCTA?.ctaEnabled) && (87 <div className="flex w-full flex-col gap-3 sm:w-auto sm:flex-row">88 {primaryCTA && <Cta cta={primaryCTA} className="w-full sm:w-fit" />}89 {secondaryCTA && <Cta cta={secondaryCTA} className="w-full sm:w-fit" />}90 </div>91 )9293 const logosElement = (94 <div className="flex flex-col gap-3">95 {logosLabel && logos.length > 0 && (96 <p className="text-muted-foreground/80 text-xs tracking-wide uppercase">97 {logosLabel}98 </p>99// … 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 |
