Notification Area
A fixed area for displaying non-intrusive notifications and alerts.
Props
Prop | Type | Default | Description |
|---|---|---|---|
items | Notification[] | [] | A bindable array of notification items. |
position | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-right' | The corner of the screen where notifications appear. |
variant | string | '' | Custom variant class for theming. |
Samples
Notification Area Samples
A fixed area for displaying non-intrusive notifications and alerts.
1. Interactive Demo
Click buttons to spawn notifications in the area.
0
<script>1
import { NotificationArea } from 'fluid-ui-svelte/components';2
import { Button } from 'fluid-ui-svelte/base';3
4
let notifications = $state([]);5
6
function add() {7
notifications = [...notifications, {8
id: Date.now(),9
message: 'New Notification!',10
type: 'success',11
duration: 300012
}];13
}14
</script>15
16
<Button onclick={async () => add()}>Notify</Button>17
<NotificationArea bind:items={notifications} position="top-right" />