Toasts

Design Code

Usage

    <nile-toast open variant="success" closable title="this is title" content="this is content"></nile-toast>

Variants


Slots

Name Description
(default) The slots’s main content.
message The container that wraps the alert's main content.
icon An icon to show in the alert. Works best with custom image or icon.

Attributes & Properties

Name Description Reflects Type Default
title For giving the tilte to the nile toast String ' '
content For giving the Content to the nile toast String ' '
open Indicates whether or not the alert is open. You can toggle this attribute to show and hide the alert, or you can use the show() and hide() methods and this attribute will reflect the alert’s open state. boolean false
closable Enables a close button that allows the user to dismiss the alert. boolean false
variant The alert’s theme variant. 'primary' | 'success' | 'neutral' | 'warning' | 'danger' 'primary'
duration The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with the alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to Infinity, meaning the alert will not close on its own. - Infinity
updateComplete A read-only promise that resolves when the component has finished updating. - -
prefixImageUrl Url for the prefix Image String ''
closeIconName Clost icon name String 'close'

Events

Name Description Event Detail
nile-show Emitted when the alert opens. -
nile-after-show Emitted after the alert opens and all animations are complete. -
nile-hide Emitted when the alert closes. -
nile-after-hide Emitted after the alert closes and all animations are complete. -

Dependencies

nile-icon-button