CTA Banner Section
tripled/cta-banner-section-baseuiFreeBlock
Animated call-to-action banner with gradient background and button animations (Base UI)
Live preview
live · rendered by the registry
Rendered by tripled on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.tripled.work/r/cta-banner-section-baseui.jsonSource
1"use client";23import { Button } from "@base-ui/react/button";4import {5 AnimatePresence,6 motion,7 MotionConfig,8 useInView,9 useReducedMotion,10 type Variants,11} from "framer-motion";12import { ArrowRight, ChevronRight, Sparkles, Zap } from "lucide-react";13import { useId, useMemo, useRef, useState } from "react";1415const motionPresets = {16 smooth: { type: "spring" as const, bounce: 0.3, duration: 0.4 },17 bounce: { type: "spring" as const, bounce: 0.5, duration: 0.35 },18 fade: { type: "tween" as const, ease: [0.26, 0.08, 0.25, 1] as const, duration: 0.2 },19};2021const highlights = [22 { id: "highlight-free", label: "Free Forever", icon: Zap },23 { id: "highlight-credit", label: "No Credit Card", icon: Sparkles },24 { id: "highlight-oss", label: "Open Source", icon: ChevronRight },25];2627interface CTABannerSectionBaseuiProps {28 motionPreset?: keyof typeof motionPresets;29 className?: string;30}3132export function CTABannerSectionBaseui({33 motionPreset = "smooth",34 className = "",35}: CTABannerSectionBaseuiProps) {36 const ref = useRef<HTMLDivElement | null>(null);37 const isInView = useInView(ref, { once: true, margin: "-10% 0px" });38 const shouldReduceMotion = useReducedMotion();39 const [hoveredButton, setHoveredButton] = useState<"primary" | "secondary" | null>(null);4041 const titleId = useId();42 const descriptionId = useMemo(() => `${titleId}-description`, [titleId]);4344 const reducedMotionVariants: Variants = {45 hidden: { opacity: 0 },46 visible: { opacity: 1 },47 };4849 const containerVariants: Variants = useMemo(50 () =>51 shouldReduceMotion52 ? reducedMotionVariants53 : {54 hidden: { opacity: 0 },55 visible: {56 opacity: 1,57 transition: {58 staggerChildren: 0.1,59 delayChildren: 0.2,60 },61 },62 },63 [shouldReduceMotion]64 );6566 const itemVariants: Variants = useMemo(67 () =>68 shouldReduceMotion69 ? reducedMotionVariants70 : {71 hidden: { opacity: 0, y: 20 },72 visible: {73 opacity: 1,74 y: 0,75 transition: { duration: 0.4 },76 },77 },78 [shouldReduceMotion]79 );8081 // Button micro-interaction variants82 const buttonVariants: Variants = {83 idle: { y: 0 },84 hover: { y: -4 },85 tap: { y: 0, scale: 0.98 },86 };8788 return (89 <MotionConfig90// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from tripled
All 282 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| About Us Pageabout-us-page-shadcnui | tripled | Blocks | Free | 2 deps | |
| About Usabout-us-section-baseui | tripled | Blocks | Free | 2 deps | |
| About Usabout-us-section-shadcnui | tripled | Blocks | Free | 2 deps | |
| Auto-Revealing Headingauto-revealing-heading-shadcnui | tripled | Blocks | Free | 2 deps | |
| Bento Grid Blockbento-grid-block-baseui | tripled | Blocks | Free | 2 deps | |
| Bento Grid Blockbento-grid-block-shadcnui | tripled | Blocks | Free | 2 deps | |
| Blog Blockblog-block-baseui | tripled | Blocks | Free | 2 deps | |
| Blog Blockblog-block-shadcnui | tripled | Blocks | Free | 2 deps |
