We’re excited to introduce Mockingbird, a design system that seamlessly integrates Tailwind CSS and Helix into ClojureScript. Mockingbird simplifies user interface development, offering a consistent user experience without the need for excessive CSS embedded within your ClojureScript code—unless, of course, you want to!
This is not a stable build yet, but we want to share what the team is currently working on to make our dear moclojer-app.
“Mockingbird” isn’t just a catchy name. It’s inspired by the famous novel To Kill a Mockingbird by Harper Lee, symbolizing how this design system brings harmony and consistency, much like the “mockingbird” sings the same song everywhere. The name also nods to Eminem’s song Mockingbird, expressing love, care, and dedication.
In that spirit, Mockingbird is our love letter to developers, providing a toolkit to enhance front-end development, even if you’re more comfortable on the backend.
Mockingbird combines functional programming with reusable components to create visually consistent, scalable, and fast web applications. With Tailwind for styling, Helix for React-based rendering, and ReFx for state management, Mockingbird offers a complete solution to modern ClojureScript UI development.
To start using Mockingbird in your project, follow these steps:
Ensure you have the following installed:
You can install Mockingbird from Clojars source:
deps.edn:
|
|
or using our npm package:
|
|
For npm, follow this setup:
We also provide a sample package.json for easier setup.
To use Mockingbird, configure your shadow-cljs.edn:
Mockingbird components are easy to use. Here’s how you can load and render a button component in your project:
This feature is only working for jar installation, if you are using npm, you will need to manually copy our target.css from the node_modules installation path of mockingbird
Mockingbird leverages Tailwind CSS classes. You can easily pass size, roundness, and other styles as parameters instead of manually adding CSS classes. Use the following build hook to copy the styles:
|
|
In your HTML file, ensure the styles are properly linked:
|
|
Here’s an example of how to render a page using Mockingbird components:
|
|
For more information, check out the official Shadow-CLJS guide.
We also distribute Mockingbird as an npm package, though it’s currently only tested with ClojureScript projects.
To install the package:
|
|
Here’s an example of how to use Mockingbird with npm:
|
|
Mockingbird components support intuitive props for size, roundness, shadows, padding, and margins. Here’s how you can easily apply different styles:
:none
, :sm
, :md
, :lg
, :xl
, :full
:none
, :sm
, :md
, :full
:none
, :sm
, :md
, :lg
:none
, :sm
, :md
, :lg
:none
, :sm
, :md
, :lg
Mockingbird is open-source! We welcome contributions in the form of new features, bug fixes, or suggestions. Visit our repository to contribute: Mockingbird on GitHub.
Mockingbird makes UI development in ClojureScript faster, more efficient, and more beautiful. Start using it today and see the difference it makes in your next project!