Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Inset Announcement Badge CTA Block for React

A card-in-card call to action for a code editor's AI completion: the headline and one sentence at the start, a linked announcement pill and a Shine Button at the end, in a muted frame with + marks on its corners.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Close a launch page with this card-in-card call to action for React with Base UI. A muted shell with solid hairlines and + marks on its corners wraps a raised panel that follows your theme. The headline and one supporting sentence sit at the start of the panel; at the end, an announcement pill that links to the release notes sits directly above the one primary control, a Shine Button, so the news leads into the action. Stacked on a phone, the headline comes first. The page's column rails and a single top rule come from the shared Guides spine, so it lines up with the blocks above and below it. The pill is built from Announcement, Badge and Status, the panel's lines from Guides, and every colour from your theme's tokens. The entrance is CSS that stays still under reduced motion. Made for product launches, version releases and any closing section where one new thing deserves a single, clear next step.

FAQ

How do I change the pill and where does it link?

The pill is one link: edit its text, and point its href at your changelog or release post. The New badge and the green dot are decoration for the eye; the link's name is what screen readers read, so keep the text in the pill saying where it goes, such as "Read the release notes", rather than repeating the headline. Keep it short: a long label is cut with an ellipsis instead of wrapping, so the pill stays one line down to 320px. It sits above the button in the end column, and on a phone it follows the headline and the sentence. The pill is an Announcement with asChild around your link on every target, so it can be your router's link, and no role="status" is added: the link keeps its own role.

Does the panel follow my theme, and how do I make it stand out more?

The panel is light on a light page and dark on a dark page: it uses bg-card and text-foreground, with no forced scope, so a different preset repaints it. It stands out by structure, a raised card in a muted shell with + marks on its corners, a shadow-lg and a ring-1 ring-foreground/15 hairline. For more emphasis, strengthen the ring or the shadow rather than painting the panel a fixed colour.

Where does the button go, and how do I add a second one?

The Shine Button is a link: point its href at the feature or the sign-up page. A band of light sweeps across it once when the pointer arrives or it takes keyboard focus; with reduced motion the light fades in where it stands instead. It is the only primary control in the block. If you add a second action, make it an outline Button and keep the pill as the news line. The button renders the link it's given with render, with nativeButton={false}.

How do screen readers and keyboards handle it?

The headline is an h2, so it sits under the page's h1. The pill and the button are the section's two tab stops, in reading order, each with a visible focus ring. The shell, the panel and the Guides lines are plain divs with no roles (the lines are aria-hidden), so nothing is announced twice.

How does it fit on a phone, and in right-to-left languages?

The panel's padding steps down from md:p-12 to p-6 and the two columns stack, headline first, so the button is on the first screen and it reads at 320px with no horizontal scroll. In a right-to-left layout the columns swap sides and the pill's arrow mirrors.

When should I use the inset frame instead of a plain band?

Use the card in card mid-page, between sections of copy: the muted shell sets the call to action apart without a full-bleed colour change. Near the footer, where it should read as the final, unmissable step, a plain band across the column feels more decisive.

  • Pro

    A centred card-in-card hiring CTA whose Shine Button wears a pinned count of open roles, with three featured roles as links in one hairline-divided strip below it.

  • Pro

    Card Inset Metric Row CTA

    Figures and stats

    A start-aligned card-in-card CTA for an API platform: a headline, one sentence and two calls to action, with three platform figures in a closing band across the foot of the panel.

  • Pro

    A reverse-split card-in-card call to action for a migration: a ruled timeline of three steps with a time chip each and a closing total, beside the headline and a Shine Button, with trust points on the shell beneath.

  • Pro

    A card-in-card enterprise CTA: a start-aligned header with a Shine Button at its end, over a hairline-divided grid of six features in two columns, each with an info button that opens a one-sentence explanation.

  • Pro

    Pill Dual Action CTA

    Prices and offers

    A band call to action: the saving of paying yearly beside one pill split into two linked halves (monthly in outline, yearly on the Shine Button), with a closing row of three figures worked out from the two prices.

  • Pro

    Reverse Split News List Hero

    Updates and timelines

    A reverse split hero on drafting lines for a team docs workspace: a greyscale product illustration beside an announcement pill, the headline, a ruled list of the latest updates as links, a Shine Button and a second action.