Toasts

Default Toast
<div class="toast">
	<span class="toast-icon">
		<i class="bi bi-bell-fill"></i>
	</span>
	<p class="toast-text text-l">
		Default toast
	</p>
</div>

Styles

<div class="toast toast-primary">
	<span class="toast-icon">
		<i class="bi bi-chat-left-fill"></i>
	</span>
	<p class="toast-text text-l">
		Primary toast
	</p>
</div>
Toast style examples

Positioning

Use toast-left-top, toast-left-bottom, toast-right-top and toast-right-bottom to position the toast components.

Animation

If you want to animate the toast component you have to install the Neptune Animations library.

Example

Then you create the component as usual and give it an animation class.

Now you have an animation for your toast component to enter the website. But it should also leave the website again. For this you set a timeout and then call up an animation that makes the toast element disappear again.

Her is a Codepen, where you can see the result.

Toast Animation Example

Last updated