Love This UI? Help It Grow and Reach More Developers Worldwide

Announcement

A versatile announcement component that displays important messages with different visual styles and states. Perfect for notifications, alerts, and call-to-action messages.

New feature added
Update successful
Action failed
Please check input
For your information
Announcing Gradients!

Installation

npx shadcn@latest add announcement.json

Usage

Loading...

Features

  • Multiple variants (default, success, error, warning, info, gradient)
  • Dark mode support
  • Keyboard accessibility
  • Disabled state
  • Click interactions
  • Smooth animations and transitions

variant

The visual style variant of the announcement. Can be one of the following:

  • "default": Default style
  • "success": Success style
  • "error": Error style
  • "warning": Warning style
  • "info": Info style
  • "gradient": Gradient style
Loading...

Props

NameTypeDefaultDescription
variant"default""success""error"
childrenReact.ReactNodeThe content to display inside the announcement
onClick(e: React.MouseEvent \React.KeyboardEvent) => void
classNamestring""Additional CSS classes to apply to the component
disabledbooleanfalseWhether the announcement is disabled and non-interactive