Vite Learn how to install and use Crispy in Vite projects.
Install the necessary dependencies.
npm install @seed-design/react @seed-design/css pnpm add @seed-design/react @seed-design/css yarn add @seed-design/react @seed-design/css bun add @seed-design/react @seed-design/css
import "@seed-design/css/base.css" ;
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"
}
{
"compilerOptions" : {
// ... your options
"paths" : {
"seed-design/*" : [
"./seed-design/*"
]
}
}
}
npm install -D @seed-design/vite-plugin pnpm add -D @seed-design/vite-plugin yarn add --dev @seed-design/vite-plugin bun add --dev @seed-design/vite-plugin
import react from "@vitejs/plugin-react" ;
import { defineConfig } from "vite" ;
import { seedDesignPlugin } from "@seed-design/vite-plugin" ;
export default defineConfig ({
plugins: [
react (),
seedDesignPlugin (),
],
resolve: {
tsconfigPaths: true ,
},
});
npm install -D @seed-design/vite-plugin vite-tsconfig-paths pnpm add -D @seed-design/vite-plugin vite-tsconfig-paths yarn add --dev @seed-design/vite-plugin vite-tsconfig-paths bun add --dev @seed-design/vite-plugin vite-tsconfig-paths
import react from "@vitejs/plugin-react" ;
import { defineConfig } from "vite" ;
import { seedDesignPlugin } from "@seed-design/vite-plugin" ;
import tsconfigPaths from "vite-tsconfig-paths" ;
export default defineConfig ({
plugins: [
react (),
seedDesignPlugin (),
tsconfigPaths (),
],
}); 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
seedDesignPlugin ({
colorMode: "light-only" ,
}); How color mode works is covered in Theming .
npx @seed-design/cli@latest add ui:action-button
Getting Started with Stackflow Learn how to set up the Crispy Stackflow plugin to use Crispy AppScreen.