CTA 3
CTA 3 é um componente de botão para React e Tailwind CSS, da biblioteca SmoothUI, com licença MIT. Copia e cola no teu projeto.
SmoothUI
MIT
buttons
O que é
CTA 3 é um componente de botão para React e Tailwind CSS, da biblioteca SmoothUI, com licença MIT. Copia e cola no teu projeto.
Como usar
Abre o componente no catálogo, carrega em copiar, e cola no teu projeto. O prompt copiado leva o código e as regras para o teu agente o reproduzir sem alterar nada.
Cinco cópias grátis por mês. Sem cartão.
Precisa de
npm i motion
Licença
Este componente vem de SmoothUI e é redistribuído sob a licença MIT, que permite uso comercial. O aviso de copyright viaja com o código.
CTA 3
"use client";
import SmoothButton from "@/components/smoothui/smooth-button";
import { motion, useReducedMotion } from "motion/react";
const SPRING = {
bounce: 0.1,
duration: 0.25,
type: "spring" as const,
};
export function CtaBanner() {
const shouldReduceMotion = useReducedMotion();
return (
<section aria-labelledby="cta-banner-heading">
<div className="px-6 py-12">
<motion.div
className="mx-auto max-w-4xl overflow-hidden rounded-2xl border bg-gradient-to-r from-primary/5 via-background to-primary/5 p-8 md:p-12"
initial={
shouldReduceMotion ? { opacity: 1 } : { opacity: 0, scale: 0.97 }
}
transition={shouldReduceMotion ? { duration: 0 } : SPRING}
viewport={{ once: true }}
whileInView={
shouldReduceMotion ? { opacity: 1 } : { opacity: 1, scale: 1 }
}
>
<div className="flex flex-col items-center justify-between gap-6 md:flex-row">
<div>
<h2
className="font-bold text-xl md:text-2xl"
id="cta-banner-heading"
>
Start building today
</h2>
<p className="mt-1 text-foreground/70 text-sm md:text-base">
Install any component with a single command.
</p>
</div>
<SmoothButton variant="candy">Get Started →</SmoothButton>
</div>
</motion.div>
</div>
</section>
);
}
export default CtaBanner;