Is there a simply way to write small, portable UIs in Clojure/script? Something akin to Elm

This page summarizes the projects mentioned and recommended in the original post on /r/Clojure

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • nativity

    I could envision distributing stuff on top of babashka too. Looks like some folks have done it via nativity. That could maybe open up quite a bit of options since babashka is kind of designed for scripting/cli/lightweight web service use cases.

  • scittle

    Execute Clojure(Script) directly from browser script tags via SCI

    Just to add another option, check out Scittle by borkdude (creator of babashka and many other things also worth using) https://babashka.org/scittle/

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • pbits-exercises

    I've had some success using electron and cljs for simple apps. I know electron is criticized for being bloated with chromium but I don't mind a few extra Mb if that means the UI is simply HTML/CSS and I can use any web framework I like (or none at all). I tend to prefer not using any framework and either write the HTML myself or using hiccup if the UI is complex enough. This is an example of a simple app I made using this approach: pbits-exercises.

  • rsvisualizer

    A simple visualization tool for the RoboCupJunior Soccer Simulator

    Also, if the app doesn't require access to the file system or interact with the OS I just use Github pages to publish the app as a regular web page. Here is an example: rsvisualizer. And you can ran the app here.

  • re-frame-template

    A Leiningen template for creating a re-frame application (client only) with a shadow-cljs build.

    If you don't need access to the local file system, then a quick way to spin up a simple app is to use the reagent template to build a web app https://github.com/reagent-project/reagent-template

  • malli-react-hook-form

    Sample app demonstrating how to integrate malli with react-hook-form

    For a cljs option you can have a client-only application that runs in the browser. I have an example app here that uses only cljs and is hosted for free on github pages https://github.com/dvingo/malli-react-hook-form

  • helix

    A simple, easy to use library for React development in ClojureScript. (by lilactown)

    You can ignore the malli/react-hook-form part - the relevant parts are the entry namespace and the shadow-cljs config. This example uses https://github.com/lilactown/helix (great tutorial here https://github.com/iwrotesomecode/react-docs-helix) but you can use reagent if you wish. I think this should meet your requirements. You can inline your data in the cljs bundle as data and add UI via react components.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • react-docs-helix

    React docs tutorial using ClojureScript Helix

    You can ignore the malli/react-hook-form part - the relevant parts are the entry namespace and the shadow-cljs config. This example uses https://github.com/lilactown/helix (great tutorial here https://github.com/iwrotesomecode/react-docs-helix) but you can use reagent if you wish. I think this should meet your requirements. You can inline your data in the cljs bundle as data and add UI via react components.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts