Skip to content

Shadleaf

UI components for Spring Boot and Thymeleaf

Themeable, rendered by Thymeleaf.

Shadleaf is a Spring Boot starter. Add the dependency, write <sl:dialog> in a template, and your page gets an accessible dialog, rendered on the server.

Version 1.0.2, for Spring Boot 4 and Java 17 or later.

You write

<sl:card>
<sl:card-header>
<sl:card-title level="3">Order #1042</sl:card-title>
<sl:card-description>Placed on 12 September</sl:card-description>
<sl:card-action><sl:badge variant="secondary">Shipped</sl:badge></sl:card-action>
</sl:card-header>
<sl:card-content>
<p>Three items, delivered to the Antwerp warehouse.</p>
</sl:card-content>
<sl:card-footer>
<sl:button as="a" href="/orders/1042" variant="outline">View order</sl:button>
</sl:card-footer>
</sl:card>

Your users get

What comes in the jar

Fits your build
The jar ships compiled CSS and JavaScript, so a plain Maven build is enough. Already compiling Tailwind? Switch to the embedded bundle and it fits into your own build.
Themed with CSS variables
Colours, radius and focus ring are CSS variables (--primary, --radius, --ring): redefine them once and every component follows, in light and dark mode.
Predefined skins
Nine skins, from Vega’s classic look to boxy Lyra, soft Luma and editorial Sera, and a hand-drawn Sketch for mockups. The shadleaf.skin property switches between them; your templates stay the same.
Ready for coding agents
Every docs page is also Markdown, listed in llms.txt. Paste the suggested rules into AGENTS.md or CLAUDE.md and your agent writes Shadleaf tags instead of React.
htmx-ready
Dialogs, menus and toasts keep working when htmx swaps them in or restores a page from history. An HX-Trigger header can pop up a toast.
Completion in your IDE
IntelliJ IDEA completes every component, prop and legal value as you type, from the web-types Shadleaf generates.

The application around your pages

Shadleaf comes with 10 layouts to copy into your project, from a sidebar that collapses to icons to a header with a user menu. Building a business application, a SaaS product, an admin tool or a customer portal? Copy a layout and you are up and running in no time. Browse the 10 layouts.

Catch a typo the first time the page renders

Every component declares its props and their legal values. Misspell a variant and the page stops with a message that lists the right ones. An icon-only button without an accessible name stops it too.

<sl:button variant="destructve">Delete</sl:button>
Invalid value 'destructve' for prop 'variant' of <sl:button>.
Must be one of: default, outline, ghost, destructive, secondary, link.

Ready to build your first page?

The getting started guide takes you from the Maven dependency to your first <sl:button>.