@soulcraft/theme (2.29.0)

Published 2026-08-13 18:40:00 +02:00 by dpsifr

Installation

@soulcraft:registry=
npm install @soulcraft/theme@2.29.0
"@soulcraft/theme": "2.29.0"

About this package

@soulcraft/theme

Unified design system for all Soulcraft products. 40 themes — each with a curated font pairing — 64 color tokens, and orthogonal surface modes.

Documentation

Quick Start

/* app.css */
@import '@soulcraft/theme/tailwind/tokens.css';
@import 'tailwindcss';
import { createThemeStore } from '@soulcraft/theme/stores/theme.svelte';
const theme = createThemeStore({ product: 'workshop' });
<script>
import ThemePicker from '@soulcraft/theme/components/ThemePicker';
</script>

<ThemePicker
  currentThemeId={theme.currentThemeId}
  surfaceMode={theme.surfaceMode}
  onselect={(id) => theme.setTheme(id)}
  onsurfacemode={(mode) => theme.setSurfaceMode(mode)}
/>

Surface Modes

All 40 themes support 6 rendering styles via one toggle:

Mode Effect
Glass Translucent blur + saturate, colored borders
Flat Solid backgrounds, crisp 1px borders, zero shadows
Raised Multi-layer shadows, no borders (light) / subtle border (dark)
Gradient Brand-tinted gradient backgrounds + gradient borders
Minimal Subtle background step only — ultra-clean, no borders or shadows
Outline Transparent backgrounds, thin border only — airy and editorial

Components use semantic tokens (--theme-card-bg, --theme-card-border, --theme-card-shadow, --theme-card-blur) that adapt automatically. The --theme-glass token is also remapped per mode for instant backward compatibility.

See docs/TOKENS.md for the full migration guide.

Exports

Import path What
@soulcraft/theme Types, utilities, catalog, CSS builders, surface mode, categorical scale
@soulcraft/theme/categorical Categorical color scale + fill-style state channel
@soulcraft/theme/stores/theme.svelte Svelte 5 theme store
@soulcraft/theme/stores/font-size.svelte Font size store
@soulcraft/theme/tailwind/tokens.css Tailwind CSS 4 token bridge
@soulcraft/theme/components/ThemePicker Theme + surface mode picker
@soulcraft/theme/components/ThemeCustomizer Color/font customizer
@soulcraft/theme/components/ThemeSwatch Single theme preview card
@soulcraft/theme/components/ThemeDotGrid Compact dot picker
@soulcraft/theme/components/ColorInput OKLCH color input
@soulcraft/theme/components/FontSizeControl Font size slider

Dependencies

Development dependencies

ID Version
@sveltejs/package ^2.5.7
@sveltejs/vite-plugin-svelte ^7.0.0
@types/jsdom ^28.0.3
@types/node ^26.1.0
jsdom ^29.1.1
svelte ^5.51.0
typescript ^5.7.3
vitest ^3.0.5

Peer dependencies

ID Version
svelte ^5.0.0
Details
npm
2026-08-13 18:40:00 +02:00
15
UNLICENSED
218 KiB
Assets (1)
Versions (69) View all
2.30.2 2026-08-27
2.30.1 2026-08-27
2.30.0 2026-08-27
2.29.0 2026-08-13
2.28.0 2026-08-13