Broadcast message

Delivers an instance-level announcement from an administrator to all users.

On this page

This docs is LLM-friendly and available as clean Markdown.

Supported browser agents can also use WebMCP to search, read, and open these docs. Learn more

Usage

import { GlBroadcastMessage } from "gitlab-ui-react/broadcast-message";
<GlBroadcastMessage dismissible={false}>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit.
</GlBroadcastMessage>

Default

Use a broadcast message only for an administrator-authored announcement that applies across an instance. The basic example is non-dismissible so the control is not shown without a visibility handler.

Broadcast message

Dismissible messages

Allow dismissal when the administrator has enabled it. GlBroadcastMessage reports the action through onDismiss but does not hide itself, so the parent must remove the message and persist the user’s choice.

Dismissible broadcast message

Types

Use the banner type for an instance-wide announcement at the top of the static panel. The notification type uses a compact layout and always includes a dismiss button, even when dismissible is false.

Banner and notification types

Admin message

Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Themes

The administrator can choose a background theme from the supported swatches. Theme is a visual choice rather than a severity scale, and notification messages do not use it visually.

Broadcast message themes

Accessibility

  • Insert broadcast messages in the natural DOM and reading order; place banners at the top of the static panel.
  • Keep content short and make links understandable from their visible text.
  • Provide a localized dismissLabel whenever a dismiss button is shown.
  • Handle onDismiss and remove the message. Do not present a close control that has no effect.
  • Do not use color alone to communicate the announcement’s meaning.
  • Use an alert instead for a system-generated, contextual, and timely message.

API

These are the component-specific props. GlBroadcastMessage also forwards supported div attributes and a ref.

Prop Description Default
type Sets the layout to banner or notification. Notifications always show a dismiss button. "banner"
theme Sets indigo, light-indigo, blue, light-blue, green, light-green, red, light-red, dark, or light. "indigo"
dismissible Shows the dismiss button for banner messages. true
dismissLabel Sets the dismiss button’s accessible label. "Dismiss"
onDismiss Runs when dismissal is requested; the parent controls visibility.
iconName Sets the leading icon from the GitLab SVG library. "bullhorn"
children Provides the announcement content.