My reusable Svelte components
- Svelte 82.3%
- TypeScript 9.3%
- CSS 8.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .vscode | ||
| docs | ||
| scripts | ||
| src | ||
| static | ||
| .gitignore | ||
| .npmrc | ||
| HANDOFF.md | ||
| jsrepo.config.ts | ||
| NOTICE.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
ns-components
A component registry for Svelte 5: you copy source files into your own repo and
own them. Styling is plain CSS only — a --ns-* token layer plus scoped
<style> blocks in each component. There is no utility-class CSS framework, no
CSS framework dependency, no PostCSS plugin, and no utility class names anywhere:
custom properties are the theming API (HANDOFF.md §1 states the constraint).
src/lib/styles/ns/tokens.css— the whole theme surface; the only file allowed to contain color literals.base.cssis reset-lite + focus ring + reduced motion.src/lib/utils.ts—cn(), a dependency-free class joiner.src/routes/— a token harness (swatches, raw token-styled controls, dark toggle); not component-library code.
Requires Node ≥ 22.18 (the token guard runs TypeScript via built-in type stripping).
npm install
npm run dev # token harness at http://localhost:5173
npm run build # production build
npm run check # svelte-check (types + a11y)
npm run check:tokens # guard: no color literals outside tokens.css
See NOTICE.md for attribution.