Skip to main content
BlocksCTADismissible announcement bar

shadcn/ui CTA blockDismissible announcement bar

A compact announcement strip for shadcn/ui with a Badge, one sentence, a small Button and a ghost icon Button to dismiss. Visibility is handled with useState and a tiny restore link keeps the section usable after dismissal.

Pro@shadcnpro/cta-14

Preview

Installation

Part of shadcn/ui Pro

Pro unlocks the source code and one-command install of all 439 blocks, plus the Figma kit, themes and the MCP server for your AI editor.

Let your AI editor install it

The shadcn/ui Pro MCP server lets Cursor, Claude Code and VS Code find and install blocks like Dismissible announcement bar from one prompt. It is included in every Pro plan.

Add the shadcn/ui components

Dismissible announcement bar uses Badge and Button.

npx shadcn@latest add badge button

Install the npm packages

npm install lucide-react

Copy the code

Paste it into components/blocks/cta-14.tsx.

components/blocks/cta-14.tsx

Part of shadcn/ui Pro

Pro unlocks the source code and one-command install of all 439 blocks, plus the Figma kit, themes and the MCP server for your AI editor.

Use it

Import it where you need it and update the import path to match your project.

Usage
import Cta14 from '@/components/blocks/cta-14';

export default function Page() {
  return <Cta14 />;
}

Overview

Dismissible announcement bar is a Pro cta block for shadcn/ui. It is built from the Badge and Button components with lucide-react, and installs as a single file you own and can edit.

It only uses semantic tokens such as bg-background, text-muted-foreground and border-border, so it follows your theme, radius and fonts and switches with dark mode. It is responsive from desktop to mobile; the width controls above the preview show each size. The same layout is in the shadcn/ui Pro Figma kit, so design and code start from one source.

Category
CTA
Component library
Radix UI (radix-ui)
Also available for
Base UI, React Aria
Built with
Badge and Button
npm packages
lucide-react
Files
components/blocks/cta-14.tsx
Access
Included in every plan

Frequently asked questions

Pricing, installation and Radix UI details for Dismissible announcement bar.