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

Similar Components

Alert

Alert is a component that conveys information to the user.

Tip

Tip is a component that displays supplementary information with a built-in icon trigger.

EmptyState

EmptyState is a component used to display when a resource is empty or unavailable.

CircleProgress

CircleProgress is a component that displays progress in a circular progress bar.

Progress

Progress is a component for visually indicating progress.

Skeleton

Skeleton is a component that acts as a placeholder until content is loaded.

Status

Status is component that indicate the status of a process or state.

Uses Components & Hooks