CLI
You can use the Yamada CLI to generate types for tokens of your customized theme, such as colors and font sizes.
Installation
Execute one of the following commands in your terminal.
pnpm add --save-dev @yamada-ui/cli
Usage
Update Type Definitions
By using the CLI, you can update the type completions for the theme tokens that Style Props refer to.
Add a script to your package.json
and specify the location of your customized theme within the script.
package.json
{..."scripts" : {..."theme" : "yamada-cli tokens path/to/theme.ts",} 、...}
Don't forget to replace path/to/theme.ts
.
The updated type definitions will be overwritten each time they are installed, so you need to run it again after each installation.
Now, execute the script you just added.
pnpm theme
Generate Theme
You can use the CLI to generate the default theme locally.
pnpm yamada-cli theme ./theme
Edit this page on GitHub