Staaarter

Animated Border CTA

Split layout pairing heading, copy, and buttons on one side with a floating image card on the other. The card sits inside a continuously rotating conic-gradient border ring, backed by a soft blurred glow shape, and the photo itself scales up slightly when the card is hovered for a premium, modern feel.

By Staaarter Team
CTA
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button, media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/animated-border-cta.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta48.tsx instead.

Usage

The file also exports cta48Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Cta48, cta48Demo } from "@/components/blocks/cta/cta48";

export default function Page() {
  return <Cta48 {...cta48Demo} />;
}

Props

PropTypeDefaultDescription
headingstring"Design that moves at your speed"Heading on the text side.
descriptionstring"A living workspace that adapts as your ideas do, with real-time previews so you always see exactly what you're shipping."Supporting copy under the heading.
primaryLabelstring"Start free trial"Label for the primary button.
primaryHrefstring"#"Link target for the primary button.
secondaryLabelstring"Watch demo"Label for the secondary button.
secondaryHrefstring"#"Link target for the secondary button.
imageMediaSlotImagenonePhoto shown inside the animated-border card.
classNamestringnoneExtra classes for the outer section element.

Behavior notes

  • The border ring is a `conic-gradient` background on an absolutely-positioned layer, continuously rotated with a component-scoped `@keyframes cta48-spin` (`transform: rotate(360deg)` on an infinite linear loop); the actual photo sits in an inset `bg-background` layer on top so only the ring shows the gradient.
  • A blurred, colored `blur-3xl` shape sits behind the card as a soft ambient glow; it is purely decorative and marked `aria-hidden`.
  • The photo itself scales up slightly on `group-hover` via `transition-transform`, no JavaScript mouse-tracking involved.
  • Both buttons are inert links (`render={<Link/>}`) pointing at `#` by default; there is no real signup flow wired up.