Using Vaadin Components
The Vaadin platform includes a set of components, with server-side Java APIs, that you can use to build your UI.
The components, together with Flow, are included as platform dependencies.
Tip
| Watch the Vaadin 14: Introduction free training video to learn more about the Vaadin platform terminology and what Vaadin components are. |
The vaadin-core
module includes all open-source components, such as TextField, Button and Grid. The vaadin
module extends this set to include all officially-supported components in the Vaadin platform, like Vaadin Charts.
Vaadin Platform Dependency
The components are part of the Vaadin platform and are included as dependencies, together with Flow. Each component has a Java API.
Using the platform dependency (com.vaadin:vaadin
) ensures that all available components, both open source and commercial, are included automatically. You are guaranteed to get compatible versions of both Flow and the components.
Example: Declaring the vaadin.platform
dependency.
<dependencies>
<!-- other dependencies -->
<!-- component dependency -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
<version>${vaadin.platform.version}</version>
</dependency>
</dependencies>
Note
| It is possible to include components individually by declaring a dependency for each component. See below for an example. |
The platform also includes themes for the components that you can customize to ensure the styling suits your needs. See Styling and Themes for more information.
You can find additional prebuilt Web Components (with Java APIs) contributed by the Vaadin community in the Vaadin Directory.
Individual Component Dependencies
As an alternative to using the platform dependency, you can declare single components as dependencies.
You should add both the Vaadin bom
and the relevant Flow component package, for example vaadin-button-flow
, to your project dependencies. The Vaadin bom
fixes all vaadin-related dependencies to a tested combination, so that the individual components can be added safely. Without the BOM, some https://www.webjars.org/ generated dependencies may change in the future, because of new releases, or because of their use of version ranges.
Example: Adding the Button component in your pom.xml
using Maven.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>
${vaadin.platform.version}
</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- other dependencies -->
<!-- component dependency -->
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-button-flow</artifactId>
</dependency>
</dependencies>
A8ED7A8C-ADBF-4661-A1CD-F72DBDDFFEB0