# \[ANN\] tw 1.1.0, Tailwind CSS in OCaml

**URL:** https://discuss.ocaml.org/t/ann-tw-1-1-0-tailwind-css-in-ocaml/18554
**Category:** Ecosystem
**Tags:** announce
**Created:** [September 23, 2026, 12:16pm UTC](https://discuss.ocaml.org/t/ann-tw-1-1-0-tailwind-css-in-ocaml/18554 "2026-09-23T12:16:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![samoht](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/samoht/32/81_2.png) [@samoht](https://discuss.ocaml.org/u/samoht)
#### Post date: [September 23, 2026, 12:16pm UTC](https://discuss.ocaml.org/t/ann-tw-1-1-0-tailwind-css-in-ocaml/18554/1 "2026-09-23T12:16:23Z")

</div>

I am happy to announce the release of [tw](https://github.com/samoht/tw/) 1.1.0 (available on brew already and soon in [opam](https://github.com/ocaml/opam-repository/pull/30790)).

```sh
$ brew install samoht/tap/tw
$ opam install tw.1.1.0

```

`tw` is an implementation of [Tailwind CSS v4](https://tailwindcss.com/) in pure OCaml. This is the first version I would advise people to use: the previous ones only partially supported some features, and it was unclear where things were breaking. The 1.1.0 release now covers _all_ the Tailwind v4 utilities, variants and official plugins, and more importantly it comes with a proper, mechanical way to check that its output has no visual difference from Tailwind’s.

`tw` now comes with a CLI that is a drop-in replacement for the Tailwind CLI. It builds whole Tailwind projects from their CSS entrypoint (`tw -i src/app.css -o dist/app.css`), including `@theme`, `@source`, `@apply`, custom utilities and variants, and the typography and forms plugins, **without Node.js**. It works for any project configured in CSS, whatever language generates the HTML.

If you are using OCaml you can directly use an OCaml API with [Tw\_html](https://github.com/samoht/tw/blob/main/lib/html/tw_html.mli) that lets you build HTML components carrying their own styles. It exposes [htmlit](https://github.com/dbuenzli/htmlit)’s API but attaches `tw` classes to every node so you can query what CSS a given HTML fragment needs to be displayed.

You can read more about the process to get to this release in my [blog post](https://gazagnaire.org/blog/2026-09-23-tailwind-parity.html). Feedback greatly appreciated in the [issue tracker](https://github.com/samoht/tw/issues) or in DMs!
