Leave Yamada UI a star

Star
Yamada UIYamada UIv1.4.7

CLI

You can generate types of tokens for customized themes such as colors and font sizes using Yamada CLI.

The CLI reads the customized theme and generates token types in node_modules/@yamada-ui/core/dist/generated-theme.types.d.ts.

Installation

Run either of the following commands in the terminal.

pnpm add --save-dev @yamada-ui/cli
Copied!

Add a script to package.json and specify the location of the customized theme in the script.

package.json

{
...
"scripts" : {
...
"theme" : "yamada-cli tokens path/to/theme.ts",
"theme:watch" : "yamada-cli tokens path/to/theme.ts --watch",
} 、
...
}
Copied!

Usage

To generate the type of theme, execute any of the following scripts.

pnpm theme
Copied!

If you want to continuously generate types while customizing the theme, execute any of the following scripts.

pnpm theme:watch
Copied!

Edit this page on GitHub

PreviousReset StylesNextComponents