Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
React Native docs
FeedbackReact Native

Banner

Present a structured semantic notice with optional actions and dismissal.

Public APILumenBannerReact Native

Native example

Use Banner

Use for persistent inline notices with optional action and dismissal. Prefer Alert for compact semantic content without banner structure.

View verified React Native runtime capture
Banner rendered in the Expo web renderer Lumen playground
Verified runtime captureExpo web renderer
tsx
<LumenBanner
  title="Workspace assigned automatically"
  description="Moved the app to Documentation."
  variant="accent"
  onDismiss={dismissAssignment}
/>

Reference

Public API

The primary shared and platform-specific options exposed by LumenBanner.

APIValues or typeDefaultDescription
titlestringRequiredNames the notice.
descriptionstringundefinedAdds supporting detail.
variantdefault · accent · destructive · success · warningdefaultSelects semantic presentation.
onDismiss(() -> Void)?undefinedAdds a labeled dismiss action.
actionsReactNodeundefinedProvides optional inline actions.

Native behavior

Design and accessibility

When to use it

Use for persistent inline notices with optional action and dismissal. Prefer Alert for compact semantic content without banner structure.

Accessibility

A banner is inline content, not a live announcement. The application decides whether newly inserted content needs a platform announcement.

Shared component

Available on other platforms

Apple / SwiftUIAndroid / Compose
React Native docsNative primitives