useLoading

useLoading is a custom hook for controlling the loading of the application.

Usage

import { useLoading } from "@yamada-ui/react"
const { screen, page, background } = useLoading()

useLoading returns instances of screen, page, and background. Each instance provides several methods:

  • start: Starts the loading animation.
  • update: Updates the loading animation.
  • finish: Finishes the loading animation.
  • force: Forces the loading animation to update.

Change Loading Scheme

Set Duration

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

Set Message

To set a message, set a ReactNode to message.

Update Message

To update a message, use update.

Configuration

Change Loading Scheme