You're browsing the documentation for an old version of MoonShine. Consider upgrading your project to MoonShine 2.x.

# Basics

Using the moonshine::toast component, you can create notifications

<x-moonshine::toast content="Message toast" />

Available types:

success info warning error

<x-moonshine::toast type="success" content="Message success toast" />

# Without use component

You can create a notification using the MoonShineUi::toast() method

use MoonShine\MoonShineUI;
MoonShineUi::toast('Toast content', 'error');