Skip to content
LoidoltTheme 0.11.1
Svelte 5

Component

ToastViewport

The fixed live region toasts are announced from.

import { ToastViewport } from '@loidolt/theme-svelte';

Example

The viewport is fixed to the corner of the page. This one is rendered inline so it can be seen.

Export queued

Preparing files.

Two warnings

Layers exceed the sheet width.

Notes

  • position places the stack at any corner or at the top or bottom centre.
  • Every inset clears the safe area, so a toast never lands under a notch or the home indicator.

Props

Generated from the component source, so it cannot drift from the implementation.

ToastViewport props
PropTypeDefaultNotes
children required Snippet—
class string—
label string'Notifications'
politeness 'polite' | 'assertive''polite'polite for routine updates; assertive interrupts and should be rare.
position 'bottom-end' | 'bottom-start' | 'bottom-center' | 'top-end' | 'top-start' | 'top-center''bottom-end'Which corner or edge the stack sits against. Top positions stack newest-last as well.
ref bindableHTMLDivElement | nullnull

Plus the attributes of HTMLAttributes<HTMLDivElement>, forwarded to the root element.