Toast notifications
Toast notifications patterns built with StyloftCSS and native HTML.
Toast
A manually triggered native notification. Queueing, application events and timed dismissal require application code.
Sample notification
Sample content. Escape or click outside to dismiss. No automatic timer or application event is wired to this example.
View HTML / PlaygroundHTML source
<button type="button" class="sl-btn" popovertarget="ref-toast">
Show notification
</button>
<div class="sl-popover sl-toast sl-stack" id="ref-toast" popover="auto" role="status">
<div class="sl-cluster sl-justify-between">
<strong>Sample notification</strong
><button
type="button"
class="sl-close"
popovertarget="ref-toast"
popovertargetaction="hide"
aria-label="Dismiss Sample notification"
>
×
</button>
</div>
<p>
Sample content. Escape or click outside to dismiss. No automatic timer or
application event is wired to this example.
</p>
</div>HTML source · enable JavaScript for the playground21 lines · UTF-8
ReadyCtrl/⌘ + Enter to run · Scripts blocked
Classes beginning with sl- come from StyloftCSS. Examples with demo- classes also use our optional demo extension CSS ↓. Load it after the core to reproduce those details.