Overview

The configuration of Yamada UI is a global setting used in various parts of the system.

The configuration defined in the theme are here.

import { defineConfig } from "@yamada-ui/react"

export const config = defineConfig({
  css: { varPrefix: "ui" },
  breakpoint: { direction: "down", identifier: "@media screen" },
  defaultColorMode: "light",
  defaultThemeScheme: "base",
  notice: { duration: 5000 },
  theme: { responsive: true },
})

Properties

PropertyDefaultDescription
css.layers-Cascade layers settings.
css.varPrefix"ui"CSS variable prefix.
breakpoint.base"9999px"Breakpoint base value.
breakpoint.containerRef-Container query reference when using the container query.
breakpoint.direction"down"Responsive design adopted media query.
breakpoint.identifier"@media screen"Media query to use for breakpoints.
defaultColorMode"light"Default color mode.
defaultThemeScheme"base"Default theme scheme.
theme.responsivefalseApply responsive design to theme tokens.
disableTransitionOnChangefalseDisable transition when changing the color mode or theme.
loading.screen.blockScrollOnMounttrueLock scrolling when loading is displayed.
loading.screen.allowPinchZoomfalseHandle zoom or pinch gestures on iOS devices when scrolling is locked.
loading.screen.loadingScheme"oval"Scheme of loading.
loading.screen.durationnullDuration of loading.
loading.screen.loadingCount0Initial count of loading.
loading.page.blockScrollOnMounttrueLock scrolling when loading is displayed.
loading.page.allowPinchZoomfalseHandle zoom or pinch gestures on iOS devices when scrolling is locked.
loading.page.loadingScheme"oval"Scheme of loading.
loading.page.durationnullDuration of loading.
loading.page.loadingCount0Initial count of loading.
loading.background.blockScrollOnMountfalseLock scrolling when loading is displayed.
loading.background.allowPinchZoomfalseHandle zoom or pinch gestures on iOS devices when scrolling is locked.
loading.background.loadingScheme"oval"Scheme of loading.
loading.background.durationnullDuration of loading.
loading.background.loadingCount0Initial count of loading.
notice.closabletrueEnable to close notice.
notice.closeStrategy["click", "drag"]Close strategy for the notice.
notice.duration5000Duration of notice.
notice.expandfalseExpand notice.
notice.limit3Maximum number of notice.
notice.placement"start"Placement of notice.
snacks.closabletrueEnable close button on snacks.
snacks.duration5000Duration of snacks.
snacks.limit-Maximum number of snacks.
snacks.placement"start"Placement of snacks.
snacks.startIndex0Start z-index of snacks.