Pittaya UI
Pittaya UI
Links

Search Components

Search for components by name, description, category or tags

Componentsstable

Announcement Badge

A flexible composite component for displaying announcements, updates, and badges with icons, text, and separators.

Introducing Pittaya UI

Installation

Install the component directly into your project using the Pittaya CLI.

npx pittaya@latest add announcement-badge

When to use

Use the Announcement Badge to highlight new features, product updates, or important notifications in a compact and visually appealing format.

This component works best in hero sections, above navigation bars, or at the top of content areas where you need to draw attention without being intrusive.

Best practices

  • Keep announcement text concise and actionable—aim for 3-5 words maximum.
  • Use the glassEffect variant when placing the badge over images or gradient backgrounds.
  • Combine icons with text to quickly communicate the nature of the announcement (e.g., 🎉 for launches, 🚀 for new features).
  • Use AnnouncementSeparator to create visual hierarchy between different pieces of information.

Accessibility

The component uses semantic HTML with proper contrast ratios for text and borders. When using icons alone, ensure you provide descriptive text alternatives for screen readers.

If the announcement is clickable or interactive, wrap it in a proper button or link element with clear labeling to communicate the action to assistive technologies.

Examples

Combine variants and sizes to meet your needs.

With icon

Use AnnouncementText before the separator to highlight a status or category.

Introducing Pittaya UI

With text badge

Use AnnouncementText before the separator for a more visual approach.

soon

Product Hunt launch is live

Glass effect variant

Use the glass effect variant for announcements over images or gradients.

🚀

Try our new dashboard

With Emoji

Use Emoji for more design consistency and flexibility.

Performance improvements

Properties

TSX interface that combines variants and default attributes.

PropTypeDefaultDescription
AnnouncementContainer
componentThe main wrapper component that holds all announcement elements.
variant
'default' | 'glassEffect''default'Controls the background style. Use glassEffect for transparent backgrounds with backdrop blur.
AnnouncementText
componentDisplays highlighted text in a badge format with background and border.
textRequired
stringThe text content to display inside the badge.
AnnouncementIcon
componentDisplays an icon from lucide-react or a string (like emoji).
iconRequired
LucideIcon | stringThe icon to display. Can be a Lucide icon component or a string (emoji).
AnnouncementSeparator
componentA vertical divider to separate different sections of the announcement.
AnnouncementTitle
componentThe main title or description text of the announcement.