logo-icon
STW UI

Notification

Notification is used to display content to users globally.

Usage

svelte
import { Notification } from 'stwui';
// OR
import Notification from 'stwui/notification'; // for tree shaking

With Icon, Title, & Description

Successfully Saved!

Anyone with a link can now view this file.

With Avatar, Title, & Description

New Message

Nice work on that proposal!

With Description & Extra

Anyone with a link can now view this file.

Notification Props

type 'info' | 'warn' | 'error' | 'success' | undefined

Notification Slots

leading <Notification.Leading slot="leading" />
content <Notification.Content slot="content" />
extra <Notification.Extra slot="extra" />

Notification.Leading Slots

avatar <Notification.Leading.Avatar slot="avatar" />
icon <Notification.Leading.Icon slot="icon" />
default

Notification.Leading.Avatar Props

src string
alt string avatar
placeholder boolean true

Notification.Leading.Icon Props

data string (IconData)
viewBox string 0 0 24 24
size string 24px
width string 24px
height string 24px
color string currentColor
stroke string | undefined
fill string currentColor

Notification.Content Slots

title <Notification.Content.Title slot="title" />
description <Notification.Content.Description slot="description" />
default

Notification.Content.Title Slots

default

Notification.Content.Description Slots

default

Notification.Extra Slots

default

Notification Class Identifiers

stwui-notification-wrapper
stwui-notification
stwui-notification-icon
stwui-notification-leading
stwui-notification-leading-avatar-wrapper
stwui-notification-leading-avatar
stwui-notification-leading-avatar-placeholder-wrapper
stwui-notification-leading-avatar-placeholder
stwui-notification-leading-icon
stwui-notification-content
stwui-notification-content-title
stwui-notification-content-description
stwui-notification-extra