Media Accordion CTA
A CTA heading, supporting copy, and button sit above a row of vertical photo strips styled like a horizontal accordion: every strip starts equal-width, and hovering one smoothly expands it while the others yield space, revealing a label and short description that slides up from the bottom.
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/media-accordion-cta.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/cta/cta52.tsx instead.
Usage
The file also exports cta52Demo, 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 { Cta52, cta52Demo } from "@/components/blocks/cta/cta52"; export default function Page() { return <Cta52 {...cta52Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "See where you'll do your best work" | Heading above the strip row. |
| description | string | "Every plan comes with the same set of workspaces, previewed here before you ever sign up." | Supporting copy under the heading. |
| actionLabel | string | "Explore all workspaces" | Label for the CTA button above the strips. |
| actionHref | string | "#" | Link target for the CTA button. |
| strips | AccordionStrip[] | none | Photo strips, each with its own label and short description. |
| className | string | none | Extra classes for the outer section element. |
Types
interface AccordionStrip { image: MediaSlotImage; label: string; description: string; }
Behavior notes
- Each strip is `flex-1` by default and grows to `flex-[3]` on its own `:hover`, with `transition-[flex]` doing the smooth expand/contract; because the row's total width is fixed, the hovered strip visually expands while its siblings shrink, no JavaScript needed.
- The label/description for a strip is scoped to that strip alone using a named `group/strip` on the strip itself, sliding up from fully hidden (`translate-y-full`) to visible (`group-hover/strip:translate-y-0`) so the row's own hover never affects a neighboring strip's label.
- The CTA button above the strips is an inert link (`render={<Link/>}`) pointing at `#` by default; there is no real navigation wired up.
- Only photos are used for every strip in this block (no video), to keep the accordion interaction the focus.
More CTA Blocks
View all →centered-newsletter-cta
Centered Newsletter CTA
Minimal centered call-to-action with heading, description, and action buttons.
split-layout-newsletter-cta
Split Layout Newsletter CTA
Two-column call-to-action with a decorative image on one side and a feature list plus subscribe form on the other.
newsletter-social-proof-cta
Newsletter CTA with Social Proof
Newsletter call-to-action with an avatar stack, subscriber count, and a testimonial quote.
banner-cta
Banner CTA
Horizontal banner call-to-action with heading and action buttons side by side.
stats-cta
Stats CTA
Call-to-action section with impressive statistics and trust indicators above action buttons.
multi-card-cta
Multi-Card CTA
Three action cards side by side, each offering a different path to conversion.