Flutter Alert Banners: Success, Info, and Warning
Success, info, and warning alert banners with semantic colors, icons, and a close affordance. A reusable notification pattern built with Wind UI className utilities.
WDiv(
className: 'mx-auto max-w-md flex flex-col gap-3',
children: [
WDiv(
className: 'flex flex-row items-center gap-3 rounded-xl border p-4 bg-emerald-50 border-emerald-200 dark:bg-emerald-950 dark:border-emerald-800',
children: [
WIcon(
Icons.check_circle,
className: 'text-emerald-500 text-xl dark:text-emerald-400'
),
WDiv(
className: 'flex-1 flex flex-col',
children: [
WText(
'Payment successful',
className: 'text-sm font-semibold text-emerald-800 dark:text-emerald-200'
),
WText(
'Your invoice has been sent by email.',
className: 'text-xs text-emerald-600 dark:text-emerald-400'
)
]
),
WIcon(
Icons.close,
className: 'text-emerald-400 text-lg dark:text-emerald-500'
),
],
),
WDiv(
className: 'flex flex-row items-center gap-3 rounded-xl border p-4 bg-sky-50 border-sky-200 dark:bg-sky-950 dark:border-sky-800',
children: [
WIcon(
Icons.info,
className: 'text-sky-500 text-xl dark:text-sky-400'
),
WDiv(
className: 'flex-1 flex flex-col',
children: [
WText(
'New update available',
className: 'text-sm font-semibold text-sky-800 dark:text-sky-200'
),
WText(
'Version 1.0.0 is ready to install.',
className: 'text-xs text-sky-600 dark:text-sky-400'
)
]
),
WIcon(
Icons.close,
className: 'text-sky-400 text-lg dark:text-sky-500'
),
],
),
WDiv(
className: 'flex flex-row items-center gap-3 rounded-xl border p-4 bg-amber-50 border-amber-200 dark:bg-amber-950 dark:border-amber-800',
children: [
WIcon(
Icons.warning,
className: 'text-amber-500 text-xl dark:text-amber-400'
),
WDiv(
className: 'flex-1 flex flex-col',
children: [
WText(
'Storage almost full',
className: 'text-sm font-semibold text-amber-800 dark:text-amber-200'
),
WText(
'You have used 92% of your quota.',
className: 'text-xs text-amber-600 dark:text-amber-400'
)
]
),
WIcon(
Icons.close,
className: 'text-amber-400 text-lg dark:text-amber-500'
),
],
),
],
)
More like this
-
Flutter Progress Stepper Wizard with Plan Selection
A multi-step wizard header with a connected step rail (completed, active, and upcoming states) over a plan selection step and a continue button, all composed from Wind utility classes.
-
Flutter Onboarding Slide with Feature Highlight and Page Dots
A polished onboarding slide built with Wind utility classes: a gradient feature icon, a bold headline, supporting copy, page indicator dots, and a full-width call to action. Dark mode pairs are included on every color token.
-
Flutter Component Search Card with Live Suggestions
A component search card built on the real WInput widget, with a focused search field and a categorized suggestion list. Demonstrates Wind form inputs with icon tiles and dark-mode pairs.