Vaadin Flow Java integration of https://github.com/PolymerElements/app-layout This addon is particularly useful if you want to create a new application with some initial support for responsiveness.
- Left side menu with hamburguer button and avatar image.
- Header with toolbar icons.
- Hierarchical menus with icons (infinite level of submenus).
- Application header with logo, title and toolbar icons.
- Menu separator with optional label.
- Support for left, middle and right click listeners.
- Menu items accept arbitrary content (such as checkboxes, or buttons)
- 4.x Compatible with Vaadin 14-22
- 5.x Compatible with Vaadin 23
- git clone repository
- mvn clean install jetty:run
To see the demo, navigate to http://localhost:8080/
See here
The issues for this add-on are tracked on its github.com page. All bug reports and feature requests are appreciated.
Contributions are welcome, but there are no guarantees that they are accepted as such. Process for contributing is the following:
- Fork this project
- Create an issue to this project about the contribution (bug or feature) if there is no such issue about it already. Try to keep the scope minimal.
- Develop and test the fix or functionality carefully. Only include minimum amount of code needed to fix the issue.
- Refer to the fixed issue in commit
- Send a pull request for the original project
- Comment on the original issue that you have implemented a fix for it
This add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.
AppLayout is written by Flowing Code S.A.
Creating the AppLayout:
AppLayout app =new AppLayout("AppLayout Addon for Vaadin 10 Demo");
Adding menu items with sub-menus & icons:
app.setMenuItems(new MenuItem("Say hello", "star", () -> showContent("Hello!")),
new MenuItem("About", "cloud", () -> showContent("About")),
new MenuItem("SubMenu").setIcon("build").add(
new MenuItem("Hello Again", "inbox",()->showContent("Hello Again!")),
new MenuItem("And Again",()->showContent("And Again!")),
new MenuItem("SubMenu").add(
new MenuItem("Hello Again",()->showContent("Hello Again!")),
new MenuItem("And Again",()->showContent("And Again!"))
)
)
);
Toolbar icons:
app.setToolbarIconButtons(
new ToolbarIconButton("Delete", "delete", ()->Notification.show("Delete action")),
new ToolbarIconButton("Search", "search", ()->Notification.show("Search action")),
new ToolbarIconButton("Close", "close", ()->Notification.show("Close action"))
);
By default, Vaadin Flow only includes com/vaadin/flow/component
to be always scanned for UI components and views. For this reason, the add-on might need to be allowed in order to display correctly.
To do so, just add com.flowingcode
to the vaadin.allowed-packages
property in src/main/resources/application.properties
, like:
vaadin.allowed-packages = com.vaadin,org.vaadin,dev.hilla,com.flowingcode
More information on Spring scanning configuration here.