🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@theme-ui/custom-properties

Package Overview
Dependencies
Maintainers
0
Versions
436
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@theme-ui/custom-properties

Generate CSS custom properties for use with Theme UI

0.17.2
latest
Source
npm
Version published
Weekly downloads
185
-4.15%
Maintainers
0
Weekly downloads
 
Created
Source

@theme-ui/custom-properties

Generate CSS custom properties for use with Theme UI.

https://theme-ui.com

Installation

npm i @theme-ui/custom-properties

Usage

Transform your Theme UI compliant theme config with the library:

const toCustomProperties = require('@theme-ui/custom-properties')
const theme = require('../theme')

module.exports = () => {
  const customProperties = toCustomProperties(theme, '🍭')

  return customProperties
}

Parameters

The @theme-ui/custom-properties function takes two parameters:

toCustomProperties($theme, $prefix)
  • theme - The theme ui specification object
  • prefix - An optional prefix for the css custom property optional

FAQs

Package last updated on 14 Feb 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