> Markdown version of [Getting Started](https://vaadin.com/docs/v8/board/webcomponents-api/getting-started). Section index: [llms.txt](https://vaadin.com/docs/v8/board/llms.txt)

# <a id="board.getting-started"></a>Getting started with Vaadin Board

`vaadin-board` is a regular [web component](https://www.webcomponents.org/), which you can add to any web page. It can be used both with and without [Polymer 2](https://www.polymer-project.org/2.0/docs/about_20).

In this tutorial, you will learn how to:

1. [Create a Polymer application](#board.project.setup)

2. [Install Vaadin Board](#board.project.setup.dependency)

3. [Import Vaadin Board in your app](#import-vaadin-board-in-your-app)

4. [\[Install your license key\]](<#Install your license key>)

5. [Add the Vaadin Board component to your web page](#board.project.setup.configuration)

In this tutorial we will use [Polymer CLI](https://www.polymer-project.org/2.0/docs/tools/polymer-cli) for creating the initial project. At the end of the tutorial, you should end up with the same code as found at [GitHub](https://github.com/vaadin/vaadin-board-getting-started).

## <a id="board.project.setup"></a>Create a Polymer application

1. [Install Polymer CLI](https://www.polymer-project.org/2.0/docs/tools/polymer-cli#install).

2. Create a directory for your app project:

   ```
   $ mkdir my-app
   $ cd my-app
   ```

3. Use Polymer to initialize a new application:

   ```
   $ polymer init
   ```

Polymer CLI will ask you a few questions to set up your app. Choose `polymer-2-application` as the starter template for your project. After the initialization process, Polymer CLI downloads dependencies and generates the following files and directories:

- `bower.json`

  Configuration file for Bower.

- `bower_components/`

  Project dependencies. See Manage dependencies.

- `index.html`

  Entrypoint page of the app.

- `src/my-app/my-app.html`

  Source code for main element.

- `test/my-app/my-app_test.html`

  Tests for main element.

## <a id="running-your-application"></a>Running your application

Run your app with:

```
$ polymer serve --open
```

The `--open` flag will fire up a browser window and open your app in it.

## <a id="board.project.setup.dependency"></a>Install Vaadin Board

You can use [Bower](https://bower.io) to install Vaadin Board dependency by running the following command inside your project folder:

```
$ bower install --save vaadin-board
```

This will install the latest available version of Vaadin Board in your project.

## <a id="import-vaadin-board-in-your-app"></a>Import Vaadin Board in your app

Next we’ll modify your app to include a Vaadin Board. Open your app element in `src/my-app/my-app.html` and add the following line in as the second line in the file, under the Polymer import, to import Vaadin Board component into your app:

```html
<link rel="import" href="../../bower_components/vaadin-board/vaadin-board.html">
```

## <a id="board.project.setup.configuration"></a>Add the Vaadin Board component to your web page

`vaadin-board` is divided into rows, using `vaadin-board-row`. Rows are divided into columns. You can put any WebComponent or HTML element inside the `vaadin-board-row`. Every element inside the row can take from one to four columns. Vaadin Board rearranges child elements based on available space.

In the example below every child `div` will use 25% on Desktop, but will be rearranged to two rows when switching to tablet: one row with 2 items 50% of available space each and second row with 100% width item.

Insert the following code in your HTML element (again, in `src/my-app/my-app.html`), inside `template` tag:

```html
<vaadin-board>
  <vaadin-board-row>
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
  </vaadin-board-row>
  <vaadin-board-row>
    <div class="item">1</div>
    <div class="item">2</div>
  </vaadin-board-row>
</vaadin-board>
```

Then we can add styling to our content. Insert the following CSS , inside the `style` tag:

```html
.item {
    display: block;
    margin-left: 0;
    margin-right: 0;
    font-weight: bold;
    border-style: solid;
    border-width: 3px;
    border-color: #fff;
    text-align: center;
    background-color: #cacaca;
    height:100px;
}
```

After these modifications your `src/my-app/my-app.html` should look like this:

```html
<link rel="import" href="../../bower_components/polymer/polymer.html">
<link rel="import" href="../../bower_components/vaadin-board/vaadin-board.html">

<dom-module id="my-app">
  <template>
    <style>
      :host {
        display: block;
      }

      .item {
        display: block;
        margin-left: 0;
        margin-right: 0;
        font-weight: bold;
        border-style: solid;
        border-width: 3px;
        border-color: #fff;
        text-align: center;
        background-color: #cacaca;
        height:100px;
      }
    </style>

    <vaadin-board>
      <vaadin-board-row>
        <div class="item">1</div>
        <div class="item">2</div>
        <div class="item">3</div>
        <div class="item">4</div>
      </vaadin-board-row>
      <vaadin-board-row>
        <div class="item">1</div>
        <div class="item">2</div>
      </vaadin-board-row>
    </vaadin-board>
  </template>

  <script>
    class MyApplication extends Polymer.Element {
      static get is() { return 'my-app'; }
      static get properties() {
        return {
          prop1: {
            type: String,
            value: 'my-app'
          }
        };
      }
    }

    window.customElements.define(MyApplication.is, MyApplication);
  </script>
</dom-module>
```

Run `polymer serve --open` to see the following result:

[Image: board getting started configuration]

Vaadin Board Basic Configuration

Vaadin Board rearranges child elements based on viewport size. You can change the size of the Web browser window to see how your application will look on different devices.

Congratulations! You have your first Vaadin Board setup. Visit our [docs](https://vaadin.com/docs/-/part/board/board-overview.html) and [demos](https://demo.vaadin.com/vaadin-board) for more information.
