Props mirror Base UI React where applicable, adapted for Svelte 5. Native HTML attributes for the rendered element are also
accepted unless noted.
Toast.Root
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
toast | ToastData | — | — |
swipeDirection | ToastSwipeDirection | ToastSwipeDirection[] | undefined | — | — |
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-closed | Present when the part is closed. |
data-ending-style | Present while the exit animation can run. |
data-expanded | Present on the element when applicable. |
data-limited | Present on the element when applicable. |
data-open | Present when the part is open. |
data-starting-style | Present while the enter animation can run. |
data-swipe-direction | Direction of an active toast swipe. |
data-swiping | Present on the element when applicable. |
data-type | Present on the element when applicable. |
Toast.Provider
| Property | Type | Default | Description |
|---|
toaster | ToastManager | undefined | — | — |
timeout | number | undefined | — | — |
limit | number | undefined | — | — |
children | Snippet | — | Content rendered inside the part. |
Toast.Action
Extends button HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
Toast.Arrow
Extends span HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-anchored | Present on the element when applicable. |
data-side | The side the popup is placed on. |
Toast.Close
Extends button HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
Toast.Content
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-behind | Present on the element when applicable. |
data-expanded | Present on the element when applicable. |
Toast.Description
Extends paragraph HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-type | Present on the element when applicable. |
Toast.Portal
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
Toast.Positioner
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
side | 'top' | 'right' | 'bottom' | 'left' | — | — |
align | 'start' | 'center' | 'end' | — | — |
sideOffset | number | — | — |
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-anchored | Present on the element when applicable. |
data-side | The side the popup is placed on. |
Toast.Title
Extends heading HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-type | Present on the element when applicable. |
Toast.Viewport
Extends div HTML attributes.
| Property | Type | Default | Description |
|---|
children | Snippet | — | Content rendered inside the part. |
| Data attribute | Description |
|---|
data-expanded | Present on the element when applicable. |