Snackbar

Brief notification that appears at a fixed screen position. Auto-dismisses after a timeout. Five severity variants and six position options.

import{ Snackbar } from "@pepulux/ui"

Default — with Undo action

Neutral dark snackbar with an inline action button. Auto-hides after 3 s.

Severity variants

Five color schemes: default (dark), success (green), warning (amber), error (red), info (blue).

Position — 6 locations

Snackbars can appear in any corner or centered at top/bottom.

Without auto-hide

Set autoHideDuration={0} to prevent automatic dismissal. User must click × to close.

Props

PropTypeDefaultDescription
open*boolean—Controls visibility
message*string—Notification message text
severity"default" | "success" | "warning" | "error" | "info""default"Color and semantic intent
position"bottom-left" | "bottom-center" | "bottom-right" | "top-left" | "top-center" | "top-right""bottom-left"Fixed screen position
action{ label: string; onClick: () => void }—Inline action button shown alongside the message
onClose() => void—Called on auto-hide or manual × close
autoHideDurationnumber4000ms before auto-dismissal. Set to 0 to disable.
classNamestring—Additional CSS classes on the snackbar container
Application component → Alerts & notificationswww.pepulux.com

Notes and documentation

Space for notes, documentation, and best practices for using these components.

Brief, non-blocking feedback

Snackbars confirm an action and may offer an undo. They disappear automatically, so never put essential information in them.