Starters
These minimal projects come with SpiraCSS configuration for Stylelint and the HTML CLI.
Install the VS Code extensions separately to try SCSS generation and @rel navigation in your editor.
Change frameworks, keep the SCSS
Each starter uses native CSS @scope instead of CSS Modules, Vue’s <style scoped>, or Astro’s automatic scoping. The six starters and the SCSS structure reference all use the same SCSS files, unchanged.
To reuse the SCSS, keep the HTML structure and class names it targets. Template syntax and SCSS imports vary by framework; see the list below.
Scope only the component root
A component root looks like this (excerpt):
@use "sass:meta";
@scope (.hero-section) { :scope { @include meta.load-css("scss");
> .hero-description { margin-top: 1.5rem; } }}Child Blocks loaded from scss/ keep ordinary class selectors, without nested @scope rules. Keep the root’s meta.load-css() inside :scope.
Global resets and variables stay outside component scopes.
@scope is standard CSS supported by current major browsers (Baseline 2026). Check compatibility if you also target older browsers.
Root syntax
SpiraCSS itself doesn’t require @scope or @layer.
The starters use scope-explicit, the default root syntax of the HTML CLI and VS Code extension. To write component roots as plain classes, set generator.scssRootStyle: 'class'. See root syntax settings.
What you can try
- SpiraCSS class structure (Block/Element, one Block per SCSS file)
- Component roots written with native CSS
@scope - Variant and state patterns (data attributes by default)
- HTML -> SCSS generation (VS Code extension / HTML CLI)
- Stylelint rule checks and error messages
@relcomment navigation (with the Comment Links extension)
Basics
- SCSS structure reference: spiracss-scss-structure
List
| Stack | Starter | Markup | SCSS loading |
|---|---|---|---|
| Vanilla (Vite) | spiracss-starter-vanilla | Plain HTML | Entry SCSS linked in HTML |
| Eleventy | spiracss-starter-eleventy | WebC templates + includes | Compiled CSS linked from templates |
| Astro | spiracss-starter-astro | Astro components | Entry SCSS imported from layout + entry files |
| Next.js | spiracss-starter-next | React components | Shared SCSS in the root layout; page SCSS imported by routes |
| Next.js | spiracss-starter-next-global | React components | Shared and page SCSS imported together by the root layout |
| Nuxt | spiracss-starter-nuxt | Vue components | Shared SCSS in config; entry SCSS imported by pages |
Before running
The starters use Node.js 24.22.2 (24 LTS) / npm 11.19.1. Follow each repository’s README, .node-version / .nvmrc files, and lockfile to set up the project.
Verification
npm run verify:scss checks that the shared SCSS matches the reference and that component roots and child Blocks use the expected syntax. Dependency audit results are recorded in each repository’s SECURITY.md.
Rendering check
In Chromium, the Home and About pages rendered identically across all six starters at the tested desktop and mobile sizes.
Verification conditions (October 29, 2026): desktop 1366×900 and mobile 390×844 with a mobile user agent, both DPR 1, after fonts loaded and animations finished. Full-page screenshots matched byte for byte, with no masking or tolerance. Other browser engines and viewport sizes were not tested.