@theme-ui/custom-properties
TypeScript icon, indicating that this package has built-in type declarations

0.16.2 • Public • Published

@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)
  1. theme - The theme ui specification object
  2. prefix - An optional prefix for the css custom property optional

Readme

Keywords

none

Package Sidebar

Install

npm i @theme-ui/custom-properties

Weekly Downloads

421

Version

0.16.2

License

MIT

Unpacked Size

12.5 kB

Total Files

12

Last publish

Collaborators

  • jxnblk
  • johno
  • hasparus
  • lachlanjc