Skip to content
ghostui

Banner

Keep an important workspace notice close to the task it affects.

Preview

Knowledge is up to date24 sources are ready for your next conversation.

Design guidance

Use a banner for a notice that affects the current task. Keep its message short. Set the tone to match the message. Keep action results and dismissal state in the caller.

Banners fit their content by default. Use width="fill" to span the available container width while keeping rounded corners. For an announcement, use placement="top" or placement="bottom". Announcement placement sets full width and square corners, and sticks to that edge of the nearest scroll container. Place it in a container that spans the page to reach both screen edges. Use native style or className for a sticky offset below an existing header.

Use Button variant="solid" for a status-colored action or variant="ghost" for a quiet action. Banner supplies context through the shared theme roles. Ghost hover and pressed fills stay transparent; the theme controls their strength through --surface-hover-opacity and --surface-active-opacity. Button owns focus, disabled, loading, and input behavior.

Installation

Install

Basic usage

Knowledge is up to date24 sources are ready for your next conversation.

Structures

The icon sits on the left by default. iconPosition="top" places it above the text. Actions sit on the right by default. actionPosition="bottom" moves them below the text and puts the close button at the end of the same row. A close-only banner keeps its close button at the top right.

Examples

Basic banner

Text only banner

Use a title and message without a leading icon or controls.

Knowledge is up to date24 sources are ready for your next conversation.

Removable banner

Add a close icon button. It aligns with the first title line. The caller removes the notice after dismissal.

Knowledge is up to date24 sources are ready for your next conversation.

Action banner

Add a Button in the action slot. Its result remains caller-owned.

Knowledge is ready24 sources are ready for your next conversation.

Description only

Omit the title for a short message. The leading icon and message align vertically at the center.

Your sources are ready for the next conversation.

Close without actions

A close-only notice keeps the close control beside the first text line, including when actionPosition="bottom" is set.

Knowledge is up to date24 sources are ready for your next conversation.

Dismissed state

Notice dismissed.

Status banner

Warning

3 sources need attentionReconnect the sources to include the latest changes.

Success

Sources connectedYour assistant can reference the project knowledge.

Danger

Primary

Workspace updateShared knowledge is available to your team.

Ghost action

Use a ghost Button for less emphasis. Its transparent hover fill lets the status background show through.

3 sources need attentionReconnect the sources to include the latest changes.

Layout variation

Bottom actions

Place the action and close control below the text. Keyboard order follows the action, then the close control.

3 sources need attentionReconnect the sources to include the latest changes.

Top icon

Place the icon above the text and keep the actions on the right when space permits.

Workspace updateShared knowledge is available to your team.

Top icon and bottom actions

Combine both placement options with a ghost action.

Multiple actions

Compose Buttons in actions. They wrap when space is limited.

Knowledge is ready24 sources are ready for your next conversation.

Without leading icon

Sources connectedYour assistant can reference the project knowledge.

Long content

Workspace updateYour research assistant can now use the interview notes and source summaries that your team added to the project this week.

Width behavior

Content width

The default banner fits its message and controls. Long content wraps within the available width.

Sources connectedYour assistant can use the project knowledge.

Fill width

Fill the containing area and keep the banner's rounded corners. This setting does not change its position.

Sources connectedYour assistant can use the project knowledge.

Special use cases

Header and footer announcements

The header announcement stays at the top. The footer announcement stays at the bottom. Both span the preview with square corners. Skeleton represents the page content between them. Scroll inside the preview or dismiss either banner independently.

Header announcementThis banner stays at the top of the page.
Footer announcementThis banner stays at the bottom of the page.

API reference