| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
| id | home |
|---|---|
| title | PatternFly Java |
Build enterprise web applications in pure Java with PatternFly components — no JavaScript required.
PatternFly Java is a 💯 Java implementation of PatternFly that integrates with and builds upon Elemento's builder API. It works with both GWT and J2CL, giving you a type-safe, fluent API to create complex web applications entirely in Java.
The following code snippet shows how PatternFly Java lets you build a complete page layout with just a few lines of Java:
body().add(page()
.addSkipToContent(skipToContent("main-id"))
.addMasthead(masthead()
.addMain(mastheadMain()
.addToggle(mastheadToggle())
.addBrand(mastheadBrand()
.addLogo(mastheadLogo("/"))))
.addContent(mastheadContent()
.addToolbar(toolbar())))
.addSidebar(pageSidebar()
.addBody(pageSidebarBody()
.addNavigation(navigation(flat)
.addItem(navigationItem("get-started", "Get started", "/get-started"))
.addItem(navigationItem("get-involved", "Get involved", "/get-involved")))))
.addMain(pageMain("main-id")
.addSection(pageSection()
.add(content()
.add(title(1, "PatternFly - Java"))
.add(p()
.add(a("https://github.com/patternfly-java/patternfly-java", "_blank")
.text("PatternFly Java"))
.add(" is a 💯 Java implementation of ")
.add(a("https://www.patternfly.org/", "_blank")
.text("PatternFly"))
.add(" without any JavaScript dependencies based on GWT/J2CL and ")
.add(a("https://github.com/hal/elemento", "_blank")
.text("Elemento"))
.add("."))))));Static factory methods, method chaining, and type-safe builders make it easy to create components, compose layouts, and wire up event handlers — all with full IDE support.
PatternFly Java aims to provide almost complete support for PatternFly's design system:
Ready to try PatternFly Java? Here's how to begin:
To use charts, you need to install the @patternfly-java/charts NPM package. This package wraps the supported PatternFly React Chart components as web components.
Install the package using npm:
npm install @patternfly-java/charts
Import it in your JavaScript file:
import "@patternfly-java/charts/dist/charts";| Back | FazBrowse Home | New Git URL |