Announcement

An announcement component that highlights key info with icons, effects, and expandable content.

Installation

npx shadcn@latest add https://scrollxui.dev/registry/announcement.json 

Usage

import {
  Announcement,
  AnnouncementTag,
  AnnouncementTitle,
} from '@/components/ui/announcement'; 
<Announcement movingBorder>
    <AnnouncementTag lustre>Latest update</AnnouncementTag>
    <AnnouncementTitle>
      New feature added
      <ArrowUpRightIcon className="shrink-0 text-muted-foreground" size={16} />
    </AnnouncementTitle>
  </Announcement>

Examples


Default


Themes


Styled


Expandable

API Reference

Announcement

An announcement component that highlights key info with icons, effects, and expandable content.

Props

PropertyTypeDefaultDescription
variantstring'outline'
Badge style variant. Used in: Announcement.
styledbooleanfalse
Adds subtle border styling. Used in: Announcement.
animation'fade''fade'
Controls announcement animation. Used in: Announcement.
iconReactNode-
Optional icon element. Used in: Announcement.
iconPosition'left' | 'right''left'
Controls icon placement. Used in: Announcement.
shinybooleanfalse
Applies lustre text effect to children. Used in: Announcement.
movingBorderbooleanfalse
Enables animated moving border. Used in: Announcement, AnnouncementTag.
movingBorderDurationnumber3000
Duration of moving border animation in ms. Used in: Announcement, AnnouncementTag.
movingBorderClassNamestring-
Custom classes for moving border element. Used in: Announcement, AnnouncementTag.
lustrebooleanfalse
Applies lustre text effect to text. Used in: AnnouncementTag, AnnouncementTitle.
multiTagsbooleanfalse
Allows multiple tags by wrapping content. Used in: AnnouncementTitle.
childrenReactNoderequired
Content inside the component. Used in: Announcement, AnnouncementTag, AnnouncementTitle, AnnouncementContainer, AnnouncementExpandedContent.

Built withby Ahdeetai.