Skip to content
WingoUI
ComponentsTemplatesDocsPricingAI agentsBlogChangelogContact
Components
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCountry SelectCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerEmail InputEmoji PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime PickerTimezone SelectTree Select
Forms
Address InputBooking WidgetCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text EditorSchema Builder
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverShare DialogSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSetup ChecklistSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadar chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselCSV ViewerDOCX EditorDOCX ViewerExcel ViewerFile SystemImage compareImage CropperImage GalleryImage LightboxLocation MapPDF ViewerPowerPoint ViewerQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadChat WidgetConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Background PatternGravity LettersMarqueeTerminalText AnimateText Rotate
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Marketing Sections
App Download SectionBlog Cards SectionCTA SectionFAQ SectionFeature GridFeature ShowcaseHero SectionIntegrations SectionLogo CloudMarketing FooterMarketing HeaderMarketing SectionNewsletter SectionPricing SectionStats SectionSteps SectionTeam SectionTestimonials SectionTimeline SectionVideo Section
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAPI Keys PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowOrder History PagePost Listing WizardPricing PageProfile PageRegister PageSettings PageUsers Admin Page
Templates
About PageAcademy PageAccessibility PageAffiliate PageAgency PageAI Product PageAppointment Booking PageBlog PageBlog Post PageBug Bounty PageCareers PageChangelog PageCommunity PageCompare PageContact PageCustomer Story PageCustomers PageDemo Booking PageDevelopers PageDocs Home PageDownload PageEnterprise PageEvents PageExperts PageFAQ PageFeature PageGlossary PageHelp Article PageHelp Center PageHome Services PageImpact PageIntegration Detail PageIntegrations PageJob Detail PageLanding PageLaunch PageLegal PageManifesto PagePortfolio PagePress PageProduct Tour PagePromo PageReal Estate PageReferral PageResearch Report PageRestaurant PageRoadmap PageROI Calculator PageSecurity PageSolutions PageStartups PageStatus PageStorefront PageSwitch PageTemplate Gallery PageTravel PageWaitlist PageYear in Review Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryTheme

Mobile

Notification Banner

Mobile

Notification Banner React component for Tailwind CSS v4

Large Title HeaderOnboarding Carousel
Live props
Layout
position
strategy
width380px
offset8px
safeArea
Appearance
variant
radius
showAppHeader
Content
appName
locale
Behavior
duration5000ms
expandable
maxQueue5
haptics
hotkey
pauseWhenPageIsHidden
hostId
Code
import { NotificationBanner } from "@/components/ui/notification-banner"

<NotificationBanner />
  1. Home
  2. Components
  3. Mobile
  4. Notification Banner
Pro

Notification Banner React component for Tailwind CSS v4

v1.0.0·Added in 1.0.0

iOS-style React notification banners for messages, orders and reminders that drop from the top one at a time, with a queue.

Mount the host once and call notify() from anywhere: a banner drops in from the top edge with a soft spring (the phone ticks once if the page has seen a tap) and leaves on its own after the duration. It shows the app icon, name and time ("acum", "acum 2 min."), the sender's photo or an icon tile, a one-line title and two lines of text. Tap or click it to open (onPress runs and the banner goes). Swipe it up with a finger, or drag it up with the mouse, to throw it away; a short drag springs back. Pull it down and, past 40px of rubber-banded pull, the grabber arms, the phone ticks and the card grows to the full text and its actions (44px buttons on touch); with a mouse, the chevron under the text does the same. The × appears on hover and on keyboard focus (touch uses the swipe). Timers pause while you hover, hold, focus or expand a banner and while the tab is hidden. More banners wait in a queue: the next one peeks out under the card with a "+2" chip and drops in after the current one leaves; a banner sent again with the same id updates in place and cross-fades its text. Keyboard: the hotkey (Alt+N, ⌥N on a Mac) focuses the banner without stealing focus on arrival; Enter opens it, ArrowDown expands and ArrowUp collapses, Tab reaches the actions, the chevron and the ×, and Escape dismisses it and returns focus to where you were. Each new banner is read once by screen readers. Below a 576px wide host banners span the top with 8px gutters under the notch; wider, they are a 380px card at the top end.

Notification Banner is a Pro React component in the React mobile components category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add notification-banner, together with Avatar, Button, useControllableState, Relative time, useLocale and 5 more and the npm packages motion and lucide-react.

Add to a project

Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup

npx wingo-ui@latest add notification-banner

Notification Banner is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans

Usage

Import NotificationBanner from @/components/ui/notification-banner.

import { useEffect, type ReactNode } from "react"
import { ShoppingCart } from "lucide-react"
import { NotificationBanner, notify } from "@/components/ui/notification-banner"

const usd = new Intl.NumberFormat("en-US", { style: "currency", currency: "USD", maximumFractionDigits: 0 })

export function CrmShell({ children }: { children: ReactNode }) {
  return (
    <>
      {children}
      <NotificationBanner
        appName="Northwind CRM"
        labels={{ queued: (n) => `+${n} waiting` }}
      />
    </>
  )
}

export function useNewOrders(orders: { id: number; total: number; locker: string }[], openOrder: (id: number) => void) {
  useEffect(() => {
    const order = orders.at(-1)
    if (!order) return
    notify({
      id: `order-${order.id}`,
      title: "New order",
      message: `Order #${order.id} · ${usd.format(order.total)} · ${order.locker}`,
      icon: <ShoppingCart />,
      tone: "success",
      onPress: () => openOrder(order.id),
      actions: [{ label: "View order", onSelect: () => openOrder(order.id) }],
    })
  }, [orders, openOrder])
}

Props

  • positiondefault "top-right"
    "top-center" | "top-right" | "top-left"

    Where the card sits once the host is at least 576px wide (a container query, so a phone frame on a desktop still gets the phone layout). Narrower, banners always span the top with 8px gutters.

  • strategydefault "fixed"
    "fixed" | "absolute"

    fixed pins the host to the viewport (the app default). absolute places it inside a relative container: a phone frame, an embedded panel.

  • widthdefault 380
    number

    Card width in px in the wide layout. Phones always use the full width minus the gutters.

  • offsetdefault 8
    number

    px below the top safe area. In the wide layout it is also the distance from the side.

  • safeAreadefault true
    boolean

    Pads env(safe-area-inset-top) so banners drop in under the notch or the Dynamic Island. It is 0 in desktop browsers and iframes.

  • variantdefault "glass"
    "glass" | "solid"

    glass: a translucent popover with a strong backdrop blur, like iOS (solid where backdrop-filter is missing). solid: the plain popover surface.

  • radiusdefault "lg"
    "sm" | "md" | "lg"

    Card corners: sm 12px, md 16px, lg 24px (iOS). The action buttons and the media tile follow.

  • showAppHeaderdefault true
    boolean

    The row with the app icon, the app name and the time. Off, the time moves next to the title (a compact chat banner).

  • appNamedefault ""
    string

    The app name in the header of every banner (a banner's own appName wins). The app icon shows its first letter on the tone's fill; empty shows a bell.

  • appIcon
    ReactNode

    Replaces the letter tile in the header (a 20px logo). A banner's own appIcon wins.

  • durationdefault 5000
    number

    ms a banner stays before it leaves. The clock pauses while it is hovered, held, focused or expanded. A banner's own duration or sticky wins.

  • expandabledefault true
    boolean

    Pull down, the chevron, a tap on a banner without onPress, or ArrowDown show the full text and the actions. Off, the actions never show.

  • maxQueuedefault 5
    number

    How many banners may wait behind the one on screen. Past it the oldest queued banner is dropped (its onDismiss runs with "dropped").

  • hapticsdefault true
    boolean

    A light tick when a banner arrives (only once the page has seen a tap) and a selection tick when it expands. Through lib/haptics.

  • hotkeydefault "alt+n"
    string

    Moves focus to the banner on screen; Escape then dismisses it and returns focus. Empty turns it off.

  • pauseWhenPageIsHiddendefault true
    boolean

    Timers stop while the tab is in the background, so a banner sent then is still there when you come back.

  • hostIddefault ""
    string

    Shows only banners sent with notify({ hostId }). Several independent hosts on one page (a phone preview next to the app). A second host with the same id stays empty.

  • localedefault ""
    string

    Formats the time ("2 min ago", "il y a 2 min") through relative-time. Empty uses the UIProvider locale, then the page language.

  • labels
    Partial<NotificationBannerLabels>

    Every string: region "Notifications", dismiss "Dismiss", expand "Show more", collapse "Show less", queued(n) "{n} more", now "now", hint "Swipe up to dismiss, pull down for more" (read with each banner). DEFAULT_NOTIFICATION_BANNER_LABELS has the English set.

  • classNames
    Partial<Record<"item" | "header" | "body" | "media" | "title" | "message" | "actions" | "action" | "close" | "expand", string>>

    Extra classes for the parts of every banner.

  • className
    string

    Extra classes for the host section (the full-width layer at the top).

Parts

  • notify

    function

    Shows a banner and returns its id. Works from anywhere (handlers, fetch helpers, outside React) and before the host mounts; ignored on the server. Options: { id?, hostId?, title, message?, icon?, avatar?: { src?, name }, appName?, appIcon?, time? (default now), tone?, color?, onPress?, actions?: { label, onSelect, tone?: "neutral" | "danger" }[], duration?, sticky?, defaultExpanded?, onDismiss?(reason) }. The same id updates the banner in place. Signature: (options: NotificationBannerOptions) => string. notify.update (id: string, options: Partial<NotificationBannerOptions>) => boolean: Changes a shown or queued banner in place (upload 2/3, a new count) and restarts its clock. false when the id is gone. notify.dismiss (id?: string) => void: Removes one banner, or every banner (shown and queued) without an id. onDismiss runs with "api".

  • useNotificationBanners

    hook

    The banner on screen and the ones waiting, for a counter or a "clear all" button. Signature: (hostId?: string) => { current: NotificationBannerRecord | null; queue: NotificationBannerRecord[] }.

  • NotificationBannerCard

    component

    One banner as a still surface, without the store, timers or gestures: the same options plus variant, radius, showAppHeader, expanded / defaultExpanded / onExpandedChange, onClose, queued, locale, labels and classNames. For previews and settings screens. Props: NotificationBannerCardProps.

  • DEFAULT_NOTIFICATION_BANNER_LABELS

    constant

    The English strings: region, dismiss, expand, collapse, the queued count, now and the swipe hint. Spread it and override what you translate.

Examples

A queue of three

Three calls in a row: the first drops in, the next peeks out under it with a +2 chip. In a host 576px or wider it is a card at the top end.

Compact chat banner

Solid surface, no app row: the time sits next to the sender, like a messenger.

Sticky, needs an answer

A new version banner that arrives expanded and stays until you reload, postpone or swipe it away.

Updating in place

The same id sent again: 1/3, 2/3, 3/3, then a success banner, without a new drop.

Brand tone for the marketplace

Northwind Market colors its app icon with the brand orange; the buyer's photo stays the media.

British locale

locale="en-GB" with the default labels: a banner sent a few minutes ago reads "3 min ago" and times use 24 hours.

Dependencies

motionlucide-reactavatarbuttonuse-controllable-staterelative-timeuse-localeuse-shortcuthapticsmotiontonesui-config

Files

  • components/ui/notification-banner.tsx

FAQ

Is the React Notification Banner component free?

The preview, props and docs are free; copying the source needs a Pro plan. See plans.

How do I install Notification Banner?

Run npx wingo-ui@latest add notification-banner. It also adds the Wingo UI items it builds on (Avatar, Button, useControllableState, Relative time, useLocale and 5 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/notification-banner.

See also

ToastNotification CenterNotification BellInstall PromptHapticslib

More React mobile components

Onboarding CarouselPicker WheelPull To RefreshSwipe DeckSwipeable TabsHero Header
All 15 React mobile components

Articles using this component

  • Web App That Feels Native on a Phone: 12 React Fixes

    Mobile UI in React · Oct 13, 2026 · 11 min read

PreviousLarge Title HeaderNext Onboarding Carousel
4:40

Thursday, Sep 24, 2026

Hi, Emma

Collected today

$2,480

Overdue

3 invoices

Simulate a notification

Tap a few times: the banners queue up.

The last action shows here.

Recent activity

  • Sophia Lee

    collected invoice #2026-0409

    $880

    4:12 PM

  • James Miller

    handed order #1042 to FedEx

    $175

    3:48 PM

  • Olivia Brooks

    sent quote #Q-2026-117

    $4,800

    2:55 PM

Tap to open, swipe or drag up to dismiss, pull down (or the chevron) for the actions. Alt+N focuses it.

duration 5000ms · maxQueue 5 · hotkey alt+n · pauseWhenPageIsHidden on · haptics on

strategy fixed · safeArea on · locale en-US · hostId playground