Socket
Book a DemoInstallSign in
Socket

@vanilla-extract/sprinkles

Package Overview
Dependencies
Maintainers
4
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vanilla-extract/sprinkles

Zero-runtime atomic CSS framework for vanilla-extract

latest
Source
npmnpm
Version
1.6.5
Version published
Weekly downloads
293K
4.23%
Maintainers
4
Weekly downloads
 
Created

What is @vanilla-extract/sprinkles?

@vanilla-extract/sprinkles is a utility for creating type-safe, theme-aware utility styles in Vanilla Extract. It allows you to define design tokens and responsive styles in a type-safe manner, making it easier to manage and apply consistent styling across your application.

What are @vanilla-extract/sprinkles's main functionalities?

Define Design Tokens

You can define design tokens such as colors and spacing scales, which can be used throughout your application to ensure consistency.

const colors = {
  primary: 'blue',
  secondary: 'green'
};

const space = {
  small: '4px',
  medium: '8px',
  large: '16px'
};

Create Sprinkles

Sprinkles allow you to create utility classes based on your design tokens. This makes it easy to apply consistent styles across your application.

import { createSprinkles, defineProperties } from '@vanilla-extract/sprinkles';

const sprinkles = createSprinkles(
  defineProperties({
    properties: {
      color: ['primary', 'secondary'],
      padding: ['small', 'medium', 'large']
    }
  })
);

Apply Sprinkles

You can apply the sprinkles to your components, ensuring that the styles are type-safe and consistent with your design tokens.

import { sprinkles } from './sprinkles.css';

const className = sprinkles({
  color: 'primary',
  padding: 'medium'
});

Other packages similar to @vanilla-extract/sprinkles

FAQs

Package last updated on 12 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.