[ANN] vdom 0.3: functional UI applications now with custom event handlers

We are thrilled to announce the release of the new v0.3 release of vdom, previously named ocaml-vdom!

The library implements the functional Elm architecture. Combined with the power of OCaml, it makes the development of UI applications easy and reliable, and that is why we have been using it internally since 2016.

A highlight of this new version is the introduction of fully customizable event handlers, using Elm-style decoders. This enhancement simplifies the management of intricate browser events, such as retrieving drag-and-dropped files.

Read our blog post for more details about this new feature!

GitHub homepage: https://github.com/LexiFi/ocaml-vdom

20 Likes

Is there a way to make ocaml-vdom work with tailwindcss?

ocaml-vdom is completely agnostic with respect to the CSS framework; you are basically generating HTML when you write code using the library. Does this answer your question?

Cheers,
Nicolas

Thanks.

After a bit of investigation, it seems we can’t use tailwind with ocaml-vdom out of the box at the moment.

See below for updates.

You absolutely can use tailwind with vdom (and generally with almost any OCaml project):

npm x -- tailwindcss -o styles.css --content './src/*.ml'

Assuming your vdom app is in src, running this will produce a styles.css with utilities used in the ml sources.

Watch mode should also work, of course.

4 Likes