Manual Learn how to install and use Crispy without bundler integration.
Install the required 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 Crispy's color tokens switch between light/dark modes through the data-seed-color-mode and data-seed-user-color-scheme attributes on the <html /> tag.
Check detailed explanations and usage methods for theming attributes.
system light only dark only
< html
data-seed
data-seed-color-mode = "system"
data-seed-user-color-scheme = "light"
>
< head >
< meta name = "color-scheme" content = "light dark" />
< script >
/* user-color-scheme setup script, modify as needed */
try {
var prefersDark = window. matchMedia ( '(prefers-color-scheme: dark)' );
if ( 'addEventListener' in prefersDark) {
prefersDark.addEventListener( 'change' , apply);
} else if ( 'addListener' in prefersDark) {
prefersDark.addListener(apply);
}
if (prefersDark.matches) {
document.documentElement.dataset.seedUserColorScheme = 'dark' ;
} else {
document.documentElement.dataset.seedUserColorScheme = 'light' ;
}
function apply () {
document.documentElement.dataset.seedUserColorScheme = prefersDark.matches ? 'dark' : 'light' ;
}
} catch (e) {}
</ script >
</ head >
</ html >
< html
data-seed
data-seed-color-mode = "light-only"
>
< head >
< meta name = "color-scheme" content = "light" />
<!-- ... -->
</ head >
</ html >
< html
data-seed
data-seed-color-mode = "dark-only"
>
< head >
< meta name = "color-scheme" content = "dark" />
<!-- ... -->
</ head >
</ html >
import "@seed-design/css/all.css" ;
npx @seed-design/cli@latest init ◇ Are you using TypeScript?
│ Yes
│
◇ Are you using React Server Components?
│ No
│
◇ Enter the seed-design folder path. (default is created at project root )
│ ./seed-design Create the file below at 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.