Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

Customize Config

By customizing the config, you can change the Color Mode and the prefix of CSS custom properties.

Changing the Color Mode

Use extendConfig to pass the generated config to UIProvider's config.

import { UIProvider, extendConfig } from "@yamada-ui/react"
const customConfig = extendConfig({ initialColorMode: "system" })
const App = () => {
return (
<UIProvider config={customConfig}>
<YourApplication />
</UIProvider>
)
}
Copied!

Changing the Prefix of CSS Custom Properties

Pass the generated config to the config of UIProvider using extendConfig.

import { UIProvider, extendConfig } from "@yamada-ui/react"
const customConfig = extendConfig({ var: { prefix: "yamada" } })
const App = () => {
return (
<UIProvider config={customConfig}>
<YourApplication />
</UIProvider>
)
}
Copied!

Changing the Breakpoint Direction

By default, Yamada UI uses @media(max-width) media queries for responsive design. If you prefer to use @media(min-width) media queries, change the breakpoint.direction to "up".

import { UIProvider, extendConfig } from "@yamada-ui/react"
const customConfig = extendConfig({ breakpoint: { direction: "up" } })
const App = () => {
return (
<UIProvider config={customConfig}>
<YourApplication />
</UIProvider>
)
}
Copied!

Edit this page on GitHub

PreviousDefault ConfigNextSemantic Tokens