Skip to content
tcpsystemsui

Theme

Colour scheme
Accent
Density
Radius
Esc

Banner

Persistent message with tone, optional action and dismiss; modes: banner, callout (in-content), notice (one quiet line).

beta

Examples

Maintenance

Maintenance tonightDeployments pause from 22:00 to 22:15 UTC.
Maintenance.svelte
<script lang="ts">
	import Banner from '@tcpsystems/ui/foundation/Banner';
</script>

<Banner title="Maintenance tonight">Deployments pause from 22:00 to 22:15 UTC.</Banner>

Tones

Retention policyBuild logs are kept for 30 days.
Preview environmentsEvery pull request now gets a preview.
Runner updateNew builds use Node 24.
Migration completeAll projects are ready.
Certificate expiringRenew the certificate within seven days.
Deployment blockedRestore a healthy build before promoting.
Tones.svelte
<script lang="ts">
	import Banner from '@tcpsystems/ui/foundation/Banner';
	import Stack from '@tcpsystems/ui/foundation/Stack';
</script>

<Stack>
	<Banner tone="neutral" title="Retention policy">Build logs are kept for 30 days.</Banner>
	<Banner tone="accent" title="Preview environments">Every pull request now gets a preview.</Banner>
	<Banner tone="info" title="Runner update">New builds use Node 24.</Banner>
	<Banner tone="ok" title="Migration complete">All projects are ready.</Banner>
	<Banner tone="warn" title="Certificate expiring">Renew the certificate within seven days.</Banner>
	<Banner tone="danger" title="Deployment blocked" dismissLabel="Dismiss warning">Restore a healthy build before promoting.</Banner>
</Stack>

Resume sync

Sync pausedInvoice updates are waiting for approval.
Resume sync.svelte
<script lang="ts">
	import Banner from '@tcpsystems/ui/foundation/Banner';
	import Button from '@tcpsystems/ui/foundation/Button';
	let paused = $state(true);
</script>

<Banner tone={paused ? 'warn' : 'ok'} title={paused ? 'Sync paused' : 'Sync resumed'}>
	{paused ? 'Invoice updates are waiting for approval.' : 'Invoice updates are being processed.'}
	{#snippet action()}
		<Button size="sm" disabled={!paused} onclick={() => paused = false}>Resume sync</Button>
	{/snippet}
</Banner>

Dismissible

Preview readyYour team can review the latest gateway build.
Dismissible.svelte
<script lang="ts">
	import '@tcpsystems/ui/foundation/elements/banner';
	import Banner from '@tcpsystems/ui/foundation/Banner';
	import Button from '@tcpsystems/ui/foundation/Button';
	import Stack from '@tcpsystems/ui/foundation/Stack';
	let revision = $state(0);
</script>

<Stack>
	{#key revision}
		<Banner title="Preview ready" dismissLabel="Dismiss preview announcement">
			Your team can review the latest gateway build.
		</Banner>
	{/key}
	<Button size="sm" onclick={() => revision++}>Show announcement again</Button>
</Stack>

API

Import
import Banner from '@tcpsystems/ui/foundation/Banner';
PropTypeDefault
mode?'banner' | 'callout' | 'notice''banner'
tone?'neutral' | 'accent' | 'ok' | 'warn' | 'danger' | 'info'none
title?stringnone
layout?'banner'none
dismissLabel?stringnone
dismissKey?stringnone
children?nativenone
Snippet
action
HookKind
.tcp-noticeRoot class
data-dismiss-keyData attribute
data-layoutData attribute
data-toneData attribute