npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fractalthemer

v0.5.0

Published

Ultra-light Svelte 5 theming system with 42 curated light & dark themes, 203 atmospheric GPU auras, 257 CSS background patterns, and responsive drawer

Readme

fractalthemer

An ultra-light, zero-runtime-overhead theming and ambient background system for SvelteKit and modern web applications. Features 41 curated light & dark themes, 203 atmospheric GPU auras, 382 gradient presets, 257 CSS background patterns, a persistent custom accent layer, an automatic glass regime for vivid backdrops, and a responsive drawer with strict background isolation.

npm version License: MIT Svelte 5


✨ Features

🏛 41 Curated Light & Dark Themes

  • 21 Light Themes: Clean editorial palettes, soft off-whites, terracotta ceramics, and vibrant accents (Emerald Light, Paper Light, Botanical, Latte, Clay Studio, Nord Light, Matcha, Sunset Amber, etc.).
  • 20 Dark Themes: Deep obsidian canvases, velvety darks, and neon synthwaves (Dracula, Catppuccin Mocha, Nord Dark, Gruvbox, OneDark Pro, Synthwave, Obsidian Crimson, Amethyst Void, etc.).
  • 30 Semantic CSS Tokens: Standardized :root CSS variables mapped across --bg, --bg-surface, --bg-panel, --text-primary, --theme-color, --border, etc.

🌌 203 Atmospheric GPU Aura Presets

  • Multi-layer GPU-accelerated atmospheric gradient blends calibrated to match every theme.
  • Categorized across aura, mesh, glass, grain, flux, nebula, lattice, prism.

📐 257 CSS Background Patterns

  • Curated vector-grade CSS background patterns across 4 categories:
    • 📐 Geometric (99): Dots, grids, isometric cubes, diagonals, checks, zigzags, honeycombs, circuits, cross-hashes.
    • ✨ Effects (66): Spotlights, light beams, cyber scanlines, bokeh, particles, starfields.
    • 🌈 Gradients (48): Multi-stop mesh gradients, chromatic conic sweeps, sunsets, twilight velvet blends.
    • 🎨 Decorative (44): Luxury radial glows, badge frames, vignette halos, organic curvature.

🛡️ Strict Background Interchangeability & Isolation

  • 1 Unified Navigation System: Seamlessly switch between Plain, Aura, Gradient, and Pattern in the drawer.
  • Full Isolation: Only the selected background family is rendered, while the last preset in every family is retained for instant switching without leftover blurs, overlays, or conflicting CSS properties.
  • Pointer-Events Isolation: Backdrops operate strictly at z-index: -1 with pointer-events: none !important.

🧊 Auto Glass Regime

  • Plain vs. Vivid: With plain, the -bg-* tokens are opaque and carry the design (sidebar vs. main contrast). The moment an aura, gradient, or pattern owns the canvas, every -bg-* token is re-emitted translucent (color-mix toward transparent) so surfaces stop competing with the backdrop.
  • Auto-Frosting: App chrome (header, nav, aside, footer, dialog, popover, ARIA landmarks) gets backdrop-filter blur automatically in vivid modes — zero markup changes. data-glass opts in any custom surface; --glass-blur tunes depth; :where() keeps specificity at zero.

🎯 Persistent Custom Accent Layer

  • Overrides Any Theme: --theme-color and --theme-color-alt can be set by the user (picker or themeState API) and ride on top of every theme — built-in or custom.
  • Survives Everything: Persisted to localStorage and applied pre-paint by the anti-flicker script, so it survives refreshes, sessions, and theme switches. Only an explicit reset clears it.
  • Smart Alt: --theme-color-alt auto-derives (−12% lightness) until the user takes control of it.

⚡ Pure Svelte 5 Runes & Zero-Flicker SSR

  • Reactive Svelte 5 state management via themeState ($state, $derived).
  • Anti-flicker SSR script preventing Flash of Unstyled Content (FOUC) across page reloads and browser hydration.

📦 Installation & Setup

1. Install Package

pnpm add fractalthemer
# or
npm install fractalthemer

2. Zero-Flicker SSR Script

Place <ThemeScript /> in your root layout — it injects a tiny synchronous script into <head> that reads localStorage (theme, background style, custom theme tokens, and the custom accent) and applies everything before first paint:

<script lang="ts">
  import { ThemeScript } from 'fractalthemer';
</script>

<ThemeScript />

Prefer wiring src/app.html manually? Paste the output of getAntiFlickerScript() into <head> — the guide walks through all three methods.

3. Add to Root Layout (src/routes/+layout.svelte)

<script lang="ts">
  import 'fractalthemer/styles.css';
  import { ThemeScript, AuraBackground, ThemePicker } from 'fractalthemer';

  let { children } = $props();
</script>

<!-- Zero-flicker initialization (before first paint) -->
<ThemeScript />

<!-- Ambient background layer (handles Plain, Aura, Gradient, and Pattern) -->
<AuraBackground />

<div class="appshell">
  <header>
    <!-- Drawer launcher & mode switcher -->
    <ThemePicker />
  </header>

  <main>
    {@render children()}
  </main>
</div>

🕹️ Runtime State & API (themeState)

Import themeState anywhere in your application for reactive runes-based theme control:

import { themeState } from 'fractalthemer';

// Switch theme
themeState.setTheme('theme-dracula-dark');

// Toggle light / dark mode
themeState.toggleMode();

// Switch background style ('plain' | 'aura' | 'gradient' | 'pattern').
// In vivid modes (aura/gradient/pattern) the -bg-* tokens automatically turn
// translucent glass and app chrome frosts — see docs/architecture/03.
themeState.setBgStyle('aura');
themeState.setAura('aura-midnight-emerald');
themeState.setGradient('grad-sunset-violet');
themeState.setPattern('pat-cyber-grid');

// Persistent custom accent (override layer above any theme — survives
// refreshes and theme switches; cleared only by an explicit reset)
themeState.setCustomAccentColor('#7C3AED');    // applies + persists, derives alt
themeState.setCustomAccentAltColor('#4C1D95'); // take control of the hover accent
themeState.resetCustomAccent();                // back to the theme's own accents

// Drawer control (drive the drawer from your own buttons too)
themeState.togglePicker(); // or openPicker() / closePicker()

// Cycle themes
themeState.cycleNext();
themeState.cycleRandom();

💅 Styling Options

Option A: Precompiled CSS (Zero-Config)

import 'fractalthemer/styles.css';

Option B: Raw Indented SASS Imports

// Master bundle (tokens, themes, auras, glass, drawer)
@use 'fractalthemer/styles'

// Or granular sub-modules:
@use 'fractalthemer/tokens'   // 30 semantic color tokens (_tokens.sass)
@use 'fractalthemer/themes'   // 41 curated theme classes (_themes.sass)
@use 'fractalthemer/auras'    // GPU gradient aura & pattern shaders (_auras.sass)
@use 'fractalthemer/glass'    // Auto glass regime: --glass-blur + chrome frost (_glass.sass)
@use 'fractalthemer/picker'   // Responsive right drawer (_theme-picker.sass)

📄 Documentation

Comprehensive architecture guides, component APIs, and token specifications:

📖 Guides

🧩 Components

🎨 Catalogs


📜 License

MIT © Fractal Mandala