Snacks

Snacks is a component for controlling notifications used in forms and other similar situations.

Usage

import { useSnacks, Snacks } from "@yamada-ui/react"
<Snacks />

Change Variant

Change Color Scheme

Change Status

To change status, set the status prop.

Change Loading Scheme

To change loading scheme, set the loadingScheme prop.

Change Direction

To change direction, set "start" or "end" to the direction prop. The default is "start".

Limit the Number of Displays

To limit the number of displays, set a number to the limit prop. If you want to display an unlimited number of notifications, set it to null. By default, 3 is set.

Set the Display Duration

To set the display duration, set a number (in milliseconds) to the duration prop.

Disable the Close Button

To disable the close button, set closable to false.

Close Notifications

To close notifications, use snack.close or snack.closeAll.

Update Notifications

To update notifications, use snack.update.

Props