Nakshora 2.0 is configured through a single file — a typed options object passed to CSSGenerator. Every option on this page links to a deep-dive article.
The config file#
nakshora.config.js
import { CSSGenerator } from 'nakshora';
const generator = new CSSGenerator({
theme: {
breakpoints: { mobile: '480px' },
colors: { brand: '#6d28d9' },
},
variants: ['hover', 'focus'],
});Every option#
| Option | Type | Deep dive |
|---|---|---|
content | string[] | — |
theme | object | configuration/theme|Theme & extend |
theme.extend | object | configuration/extend|Extending vs overriding |
darkMode | string | configuration/darkmode|Dark mode option |
prefix | string | configuration/prefix|Class prefix |
important | boolean | string | configuration/important|Important mode |
corePlugins | array | object | configuration/core-plugins|Disabling core plugins |
safelist | array | configuration/safelist|Safelist |
plugins | array | configuration/plugins|Plugin API |
presets | array | configuration/presets|Presets |
Tip. v2 configuration is the ancestor of the v3 file format — if you know one, you know both.
