toast Component
Toast Notification System
Debug Info: Open browser console and check if hygge.toast exists. If clicking buttons does nothing, try a hard refresh (Ctrl+F5 or Cmd+Shift+R).
Basic Toast Types
Preview
Code
Toast Sizes
Preview
Code
Toast Positions
Preview
Code
Full Width Positions (Perfect for Mobile):
Style Variants
Preview
Code
Display Time & Progress
Preview
Code
Interactive Features
Preview
Code
Full Width Mobile Patterns
Preview
Code
Advanced Examples
Preview
Code
Alert System Integration (hygge.say)
Preview
Code
The hygge.say function processes complex message arrays and displays them as toasts.
Configuration Options
Preview
Code
| Option | Type | Default | Description |
|---|---|---|---|
| header | string | '' | Toast title/header text |
| description | string | '' | Toast body/description text |
| type | string | 'info' | success, error, info, warning, primary |
| icon | string | auto | Custom icon name (overrides type default) |
| displayTime | number/null | null | Seconds (0=no dismiss, null=auto-calculate) |
| position | string | 'top-right' | 9 position combinations |
| size | string | 'small' | tiny, small (default), '', large, big |
| showProgress | boolean | false | Show countdown progress bar |
| dismissible | boolean | true | Show close button |
| variant | string | 'filled' | light, filled, outline |
| actions | array | [] | Action buttons/links |
| onClick | function | null | Toast click handler |
| onClose | function | null | Close event callback |