Announcement

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

Loading...

Installation

npx shadcn@latest add @scrollxui/announcement 

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

Loading...

Themes

Loading...

Styled

Loading...

Expandable

Loading...

API Reference

Announcement

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

Props

PropertyTypeDefaultDescription
variantstring'outline-solid'
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.