← All projects
Web UI

Shadleaf

Shadleaf brings shadcn/ui-style components to Spring Boot and Thymeleaf. Add the starter, write component tags in your templates, and the server renders them.

Status Active
Java 17+ (Spring Boot 4)
Learning curve Easy
Latest release 1.0.3
Shadleaf interface

Shadleaf brings shadcn/ui-style components to Spring Boot and Thymeleaf. Add the starter, write component tags in your templates, and the server renders them.

Code Example


                <!-- pom.xml: io.github.wimdeblauwe:shadleaf-spring-boot-starter:1.0.3 -->
                <html xmlns:th="http://www.thymeleaf.org" xmlns:sl="https://shadleaf.dev/sl">
                <head>
                  <th:block th:replace="~{sl/layout :: theme-script}"></th:block>
                  <th:block th:replace="~{sl/layout :: assets}"></th:block>
                </head>
                <body>
                  <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>
                </body>
                </html>