Skip to content

Live Demos

Explore live demos of all announcement features. Each demo page displays real announcements configured specifically for that page, so you can see the plugin in action with real configurations.

Here’s a taste of the configurations used in each demo:

Four visual styles matching Starlight’s aside colors:

{ id: 'note', content: 'General information', variant: 'note' }
{ id: 'tip', content: 'Helpful tips', variant: 'tip' }
{ id: 'caution', content: 'Warning notice', variant: 'caution' }
{ id: 'danger', content: 'Critical alert', variant: 'danger' }

Add call-to-action buttons to drive user engagement:

{
id: 'with-link',
content: 'New documentation available!',
link: {
text: 'Read the docs',
href: '/getting-started/',
},
}

Control whether users can dismiss announcements:

// User can dismiss (default)
{ id: 'dismissible', content: '...', dismissible: true }
// Cannot be dismissed - always visible
{ id: 'critical', content: '...', dismissible: false }

Control how multiple announcements appear:

starlightAnnouncement({
displayMode: 'stack', // Show all (default)
displayMode: 'first', // Show only first match
displayMode: 'rotate', // Cycle through with animation
rotateInterval: 5000, // 5 seconds between transitions
})

Show announcements only during specific time periods:

{
id: 'event',
content: 'Conference starts tomorrow!',
startDate: '2026-03-01',
endDate: '2026-03-15',
}

Each demo page has announcements targeted using the showOn option. This lets you see specific features in isolation:

{
id: 'demo-variant-note',
content: 'This is a note variant.',
variant: 'note',
showOn: ['/demos/variants/', '/demos/variants/**'],
}

The announcements are fully functional - you can dismiss them, click links, and watch rotations. To reset dismissed announcements, clear the starlight-announcements-dismissed key from your browser’s localStorage.

For detailed documentation on all options, see: