My reusable Svelte components
  • Svelte 82.3%
  • TypeScript 9.3%
  • CSS 8.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-07 23:50:40 -08:00
.vscode feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00
docs feat(batch4): date-picker recipe — popover + calendar/range-calendar compositions + docs/RECIPES.md 2026-11-07 23:48:07 -08:00
scripts feat(registry): jsrepo.config.ts build, portable relative imports, emit guards, static/r output 2026-11-07 20:20:15 -08:00
src feat(batch4): list the date-picker recipe on /components; rebuild registry 2026-11-07 23:48:24 -08:00
static chore(registry): rebuild static/r after the sidebar class fix and sheet docblock 2026-11-07 23:42:43 -08:00
.gitignore feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00
.npmrc feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00
HANDOFF.md docs(handoff): batch 4 — status, invariants 15-20, probe + orchestration playbook 2026-11-07 23:50:40 -08:00
jsrepo.config.ts feat(batch4): register sidebar (52 items) and list it on /components 2026-11-07 23:23:26 -08:00
NOTICE.md chore(deps): add @internationalized/date ^3.12.4 for the date family 2026-11-07 22:27:40 -08:00
package-lock.json chore(deps): add @internationalized/date ^3.12.4 for the date family 2026-11-07 22:27:40 -08:00
package.json chore(deps): add @internationalized/date ^3.12.4 for the date family 2026-11-07 22:27:40 -08:00
README.md feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00
tsconfig.json feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00
vite.config.ts feat(phase1): SvelteKit skeleton with --ns-* token layer, base CSS, cn(), token harness and literal guard 2026-11-07 20:20:12 -08:00

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.css is 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.