
Snackbar Component
A fully-featured snackbar/toast notification component with multiple types (success, error, warning, info), customizable positions (top/bottom), actions, and animations. Includes a global SnackbarManager for app-wide notifications.
- notification
- toast
- animation
snippet.swift393 lines
8 files • Scroll to see all →
public enum SnackbarType { case success case error case warning case info case custom(backgroundColor: Color, iconColor: Color) var backgroundColor: Color { switch self { case .success: return .green case .error: return .red case .warning: return .orange case .info: return .blue case .custom(let backgroundColor, _): return backgroundColor } } var iconColor: Color { switch self { case .success, .error, .warning, .info: return .white// ... (click "Show full code" to see more)Viewing: SnackbarType.swift•1 of 8