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

0.16.2 • Public • Published

@theme-ui/tailwind

Generate static CSS for use outside of React with Theme UI and Tailwind.css.

Why?

Though Theme UI comes with its own implementation, project constraints might require pure utility CSS output. This library allows you to leverage a Theme UI theme that is used elsewhere and transforms it to the configuration that Tailwind expects. The best of both worlds.

Installation

npm i @theme-ui/tailwind

Usage

Transform your Theme UI compliant theme config with the library:

// tailwind.config.js
const toTailwind = require('@theme-ui/tailwind')
const theme = require('./theme') // Path to Theme UI config

module.exports = toTailwind(theme)

Then, use the Tailwind CLI:

tailwind build input.css -o output.css

Dependents (4)

Package Sidebar

Install

npm i @theme-ui/tailwind

Weekly Downloads

562

Version

0.16.2

License

MIT

Unpacked Size

10.9 kB

Total Files

12

Last publish

Collaborators

  • jxnblk
  • johno
  • hasparus
  • lachlanjc