Skip to content

Shadleaf

UI components for Spring Boot and Thymeleaf

shadcn/ui, rendered by Thymeleaf.

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

Version 0.9.0, 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

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.

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.
shadcn’s token names
Shadleaf reads the same CSS variables as shadcn/ui (--primary, --radius, --ring), so a shadcn theme works unchanged in light and dark mode.
Two skins
Vega has shadcn’s classic look and Lyra is boxy and sharp. 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 9 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 9 layouts.

Ready to build your first page?

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