Webpack Learn how to install and use Crispy in Webpack projects.
Install the necessary dependencies.
npm install @seed-design/react @seed-design/css @seed-design/webpack-plugin pnpm add @seed-design/react @seed-design/css @seed-design/webpack-plugin yarn add @seed-design/react @seed-design/css @seed-design/webpack-plugin bun add @seed-design/react @seed-design/css @seed-design/webpack-plugin
import "@seed-design/css/base.css" ;
+import { SeedDesignPlugin } from '@seed-design/webpack-plugin' ;
export default defineConfig ({
plugins: [
+ new SeedDesignPlugin ()
]
}) Without options, color mode follows the user's system settings. To fix it to light or dark, specify colorMode.
Option Type Default Description colorMode"system" | "light-only" | "dark-only""system"Global color mode. system follows the user's OS setting injectColorSchemeTagbooleantrueWhether to inject the color-scheme meta tag fontScalingbooleanfalseOn iOS, whether to scale text according to the user's system text size setting
new SeedDesignPlugin ({ colorMode: "light-only" }); How color mode works is covered in Theming .
npx @seed-design/cli@latest init ◇ Do you use TypeScript?
│ Yes
│
◇ Do you use React Server Components?
│ No
│
◇ Enter the seed-design folder path. (The default is the project root. )
│ ./seed-design Create the following file in your project root.
{
"rsc" : false ,
"tsx" : true ,
"path" : "./seed-design"
} npx @seed-design/cli@latest add ui:action-button
{
"compilerOptions" : {
// ... your options
"paths" : {
"seed-design/*" : [
"./seed-design/*"
]
}
}
}
Getting Started with Stackflow Learn how to set up the Crispy Stackflow plugin to use Crispy AppScreen.