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

@wix/wix-theme-variables

v1.0.0

Published

Wix Theme Variables Library for helping use the Wix theme

Readme

Wix Theme Variables

A TypeScript library for working with Wix Theme System variables - providing structured access to CSS custom properties and theme definitions.

What are Wix Themes?

Wix Themes use a CSS custom property system that allows consistent styling across Wix sites. Each theme defines variables for colors, typography, spacing, and layout that components can reference. This library provides a typed interface to access and work with these theme variables.

Installation

npm install @wix/wix-theme-variables

API Methods

Core Functions

import { 
  getAllVariables, 
  getVariablesByType, 
  getVariablesByCategory,
  getVariableByName 
} from '@wix/wix-theme-variables';

// Get all theme variables
const allVars = getAllVariables();

// Get variables by type (with TypeScript autocomplete)
const colorVars = getVariablesByType('color');
const fontVars = getVariablesByType('fontSize');

// Get variables by category
const textStyles = getVariablesByCategory('textStyle');
const backgrounds = getVariablesByCategory('background');

// Find specific variable
const heading = getVariableByName('heading_1_font');

Lookup Functions

// Find by legacy CSS property name
const variable = getVariableByLegacyName('heading-1-font');

// Find by CSS custom property key
const variable = getVariableByVariableKey('--wst-heading-1-font');

// Get available types and categories
const types = getAllTypes();           // ['color', 'fontSize', 'fontFamily', ...]
const categories = getAllCategories(); // ['textStyle', 'background', 'border', ...]

Variable Structure

Each variable contains:

interface WixThemeVariable {
  name: string;           // 'heading_1_font'
  legacyName: string;     // 'heading-1-font' 
  variableKey: string;    // '--wst-heading-1-font'
  type: VariableType;     // 'font' | 'color' | 'fontSize' | ...
  category: VariableCategory; // 'textStyle' | 'background' | ...
  description?: string;   // Optional description
  complexity?: 'Simple' | 'Complex';
  reference?: string;     // Reference to other variables
}

Type Safety

The library provides full TypeScript support with autocomplete for:

  • Variable types: 'color', 'fontSize', 'border', 'spacing', etc.
  • Categories: 'textStyle', 'background', 'globalColor', etc.
  • All function parameters and return types

Example Usage

import { getVariablesByType, getVariablesByCategory } from 'wix-theme-variables';

// Get all color variables for a color picker
const colorOptions = getVariablesByType('color');

// Get text styling variables for typography controls  
const textStyles = getVariablesByCategory('textStyle');

// Build CSS custom property references
const cssVars = colorOptions.map(v => v.variableKey);
// Result: ['--wst-base-1-color', '--wst-shade-1-color', ...]

Development

See DEVELOPMENT.md for development setup, linting, and contribution guidelines.

License

ISC