Notification Area

A fixed area for displaying non-intrusive notifications and alerts.

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: 3000

12

    }];

13

  }

14

</script>

15

16

<Button onclick={async () => add()}>Notify</Button>

17

<NotificationArea bind:items={notifications} position="top-right" />