WingoUI
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime Picker
Forms
Address InputCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text Editor
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSkeletonSpinnerToast
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 chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselImage CropperImage LightboxLocation MapQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Gravity Letters
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
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowPost Listing WizardPricing PageRegister PageSettings PageUsers Admin Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryThemeCredits

Feedback

Alert

FeedbackAlert
TourBanner
Live props
Content
title
description
closeLabel
Appearance
variant
tone
color
size
radius
Layout
banner
Behavior
dismissible
role
State
defaultOpen
Code
import { Alert } from "@/components/ui/alert"

<Alert />
Free

v1.0.0·Added in 1.0.0

An inline message about a page or a section, from a failed payment to a maintenance banner, in three variants and six tones.

The alert sits in the page and never blocks it: server-rendered alerts show up as they are, and one that appears later (after a failed submit) fades in without pushing the page around. Its actions are real buttons that match the tone, and on a solid fill they flip to the fill's text color. With dismissible on, the close button (or Tab to it, then Enter or Space) fades the alert out while its space collapses and the content below slides up; open it again and it springs back in. With reduced motion it only fades. Closing it with focus inside moves focus to the next control instead of dropping it on the page (after a tap a text field is skipped, so the phone keyboard never pops up). Errors and warnings are announced by screen readers right away, other tones politely. On a phone two or more actions stretch into a full-width button bar under the text, and the close button keeps a 44px hit area. As a banner it spans the page: one line with the actions at the end once it is wide enough, stacked on a phone or in a narrow panel.

Add to a project

npx wingo-ui@latest add alert

Dependencies

motionlucide-reactbuttonmotiontonesuse-controllable-stateui-config

Files

  • components/ui/alert.tsx

See also

Alert DialogBadgeButtonToneslibMotion presetslib
PreviousTourNext Banner

Checkout

$249.00
We could not process the payment
Your bank declined the card. Try another card or pay on delivery.
  • Tomtoc 14" laptop sleeve

    Dark gray

    $129.00
  • Logitech M650 wireless mouse

    Graphite

    $120.00

Visa •••• 4242

Expires 09/26

Retry or pay on delivery to watch it collapse