Installation
Install Natcore, import the stylesheet, and start using component classes in your markup.
Quick start
1
1
Install package
Add Natcore and Tailwind to the app that owns your global stylesheet.
pnpm
Codebash
pnpm add @nataliebasille/natcore-design-system tailwindcssnpm
Codebash
npm install @nataliebasille/natcore-design-system tailwindcssyarn
Codebash
yarn add @nataliebasille/natcore-design-system tailwindcss2
2
Import stylesheet
Load Tailwind first, then Natcore. The import registers tokens, component classes, modifiers, and color palettes.
Codecss
@import "tailwindcss";
@import "@nataliebasille/natcore-design-system";3
3
Use classes
Natcore is CSS-first, so the same classes work in React, server-rendered templates, or plain HTML.
Codehtml
<html data-theme="citrine-reef">
<body>
<button class="button button-solid/primary">
Create project
</button>
</body>
</html>
4
4
Verify setup
Run a production build once after the import is in place so Tailwind can emit the classes used by your app.
Codebash
pnpm buildNext steps
Components
Start with button, card, badge, divider, list, toggle, and tray.
Modifiers
Pair component classes with palette and state modifiers to keep markup readable.
Themes
Set data-theme on the root element and the same HTML follows the new palette.