Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

postcss-elm-tailwind

> 前端框架
Open source

put some tailwind in your elm

99 stars0 likes0 views
WebsiteGitHub

About

put some tailwind in your elm

postcss-elm-tailwind

tailwind + elm = :rocket:

See the demo and repo.

…

Installation

bash
yarn add postcss-elm-tailwind --dev

# OR

npm i -D postcss-elm-tailwind

Usage

…

See the demo for a full example.

Other output formats

SVG

If you want to use Tailwind classes to style SVG you can output an Svg module like this:

javascript
module.exports = {
  plugins: [
    require("tailwindcss"),
    require("postcss-elm-tailwind")({
      tailwindConfig: "./tailwind.config.js",
      elmFile: "src/Tailwind.elm",
      elmModuleName: "Tailwind",
      formats: {
        svg: {
          elmFile: "src/Tailwind/Svg.elm",
          elmModuleName: "Tailwind.Svg"
        }
      }
    })
  ]
};

String

If you want access to the class names themselves, you can output a String module as an escape hatch:

javascript
module.exports = {
  plugins: [
    require("tailwindcss"),
    require("postcss-elm-tailwind")({
      tailwindConfig: "./tailwind.config.js",
      elmFile: "src/Tailwind.elm",
      elmModuleName: "Tailwind",
      formats: {
        string: {
          elmFile: "src/Tailwind/String.elm",
          elmModuleName: "Tailwind.String"
        }
      }
    })
  ]
};

Other things to note

In order to get a small build, you'll need to build Tailwind twice - once without purgecss to build TW.elm with all the classes and once with purgecss so that all the unused classes are removed from your production CSS. See how this is implemented in the demo.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptelmpostcsstailwindcss

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架