Vaadin components is an evolving set of high-quality web components for business web applications.
Install the components that you need from npm:
npm install @vaadin/vaadin-gridImport the component's JavaScript module, use the component in your HTML, and control it with JavaScript:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Vaadin example</title>
</head>
<body>
<!-- Use web components in your HTML like regular built-in elements. -->
<vaadin-grid theme="row-dividers" column-reordering-allowed multi-sort>
<vaadin-grid-selection-column auto-select frozen></vaadin-grid-selection-column>
<vaadin-grid-sort-column width="9em" path="firstName"></vaadin-grid-sort-column>
<vaadin-grid-sort-column width="9em" path="lastName"></vaadin-grid-sort-column>
<vaadin-grid-column width="9em" path="address.city"></vaadin-grid-column>
</vaadin-grid>
<!-- Vaadin web components use standard JavaScript modules. -->
<script type="module">
// Importing the following modules registers <vaadin-grid> and its column
// elements so that you can use them in this page.
import '@vaadin/vaadin-grid/vaadin-grid.js';
import '@vaadin/vaadin-grid/vaadin-grid-selection-column.js';
import '@vaadin/vaadin-grid/vaadin-grid-sort-column.js';
// Use component's properties to populate data.
const grid = document.querySelector('vaadin-grid');
fetch('https://demo.vaadin.com/demo-data/1.0/people?count=200')
.then(res => res.json())
.then(json => grid.items = json.result);
</script>
</body>
</html>Serve your HTML with a development server that supports bare module specifiers, such as @web/dev-server:
npm i -g @web/dev-server
web-dev-server --node-resolve --openThis project contains components for Vaadin 20+. Please see individual repositories for older Vaadin versions.
The components below are licensed under the Apache License 2.0.
The components below are licensed under CVDL 4.0 license and available as part of the Vaadin Pro Subscription.
Vaadin components use Custom Elements and Shadow DOM that are natively supported by modern browsers.
Check out our design system documentation.
Are you looking for an example project to get started? Visit start.vaadin.com to create a Vaadin app.
For help and support questions, please use our community chat.
Cross-browser Testing Platform and Open Source <3 Provided by Sauce Labs.
Read the contributing guide to learn about our development process, how to propose bugfixes and improvements, and how to test your changes to Vaadin components.
Setup the repo:
yarnSetup the environment variables needed by the scripts below, by copying the .env.dist template file to .env:
cp .env.dist .env
and then configure the individual variable values in the newly created .env file.
Not all variables are necessary for all scripts, individual sections below will note which variables are required to run a command.
Run all tests in Chrome:
yarn testRun all tests in Firefox:
yarn test:firefoxRun all tests in WebKit:
yarn test:webkitRun tests for single package:
yarn test --group vaadin-uploadDebug tests for single package:
yarn debug --group vaadin-uploadTo run the visual tests, please make sure that the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables are defined.
Run tests for Lumo:
yarn test:lumoRun tests for Material:
yarn test:materialUpdate reference screenshots for Lumo:
yarn update:lumoUpdate reference screenshots for Material:
yarn update:materialUpdate screenshots for single package:
yarn update:lumo --group vaadin-uploadRe-generate SVG icon sets and icon fonts from individual SVG files for the packages that have them (e.g. vaadin-icons):
yarn iconsCheckout master and pull latest changes:
git checkout master && git pullCreate a new branch from master:
git checkout -b 22.0Push a newly created branch:
git push origin 22.0The newly created branch for the current major is protected by default. The rest of the changes to that branch should happen the usual way, through a PR.
Create another branch:
git checkout -b update-v22Update wtr-utils.js as follows:
const getChangedPackages = () => {
- const output = execSync('./node_modules/.bin/lerna ls --since origin/master --json --loglevel silent');
+ const output = execSync('./node_modules/.bin/lerna ls --since origin/22.0 --json --loglevel silent');
return JSON.parse(output.toString());
};Create a PR to the version branch (example).
Create a new branch from master:
git checkout master && git checkout -b bump-v23Prepare a new version for the updateVersion script by running the following command:
export npm_config_bump=23.0.0-alpha0Run the script to bump static version getters in ElementMixin, Lumo and Material:
node scripts/updateVersion.jsMark the new version with Lerna:
lerna version 23.0.0-alpha0 --no-push --no-git-tag-version --yesCommit all the changes:
git commit -a -m "chore: update master to Vaadin 23 [skip ci]"Create a PR to the master branch (example).
Add the new version branch to the CheckoutBranch parameter:
For specific package(s), check the LICENSE file under the package folder.
