Docs

Board

Board is a powerful and easy-to-use layout element for building views that work with various screen sizes.
Note
Commercial feature

A commercial Vaadin subscription is required to use Board in your project.

Board is a powerful and easy-to-use layout element for building responsive views. It reorders the components inside it on different screen sizes while maximizing the use of available space.

Open in a
new tab
<BoardRow>
  <ExampleIndicator current="745" change={+33.7} title="Current users" />
  <ExampleIndicator current="54.6k" change={-112.45} title="View events" />
  <ExampleIndicator current="18%" change={+3.9} title="Conversion rate" />
  <ExampleIndicator current="-123.45" title="Custom metric" />
</BoardRow>
<BoardRow>
  <ExampleChart />
</BoardRow>

Use Board to create responsive views and dashboards that work on any screen size.

Responsive

Board is responsive by default, meaning that it doesn’t require any custom development. Its layout is automatically optimized and adjusted based on the screen size, ensuring that the components utilize all available space.

Rows & Columns

Board is made up of rows. Each row supports up to four columns and can contain up to four components.

Nested Rows

Rows can be nested for finer-grained control of how certain areas of the layout behave on resize, and how they are rendered.

Open in a
new tab
<Board className="board-nested">
  <BoardRow>
    <div {...{ 'board-cols': 2 }}>
      <ExampleStatistics {...{ 'board-cols': 2 }} />
    </div>
    <BoardRow {...{ 'board-cols': 1 }}>
      <ExampleIndicator current="745" change={+33.7} title="Current users" />
      <ExampleIndicator current="18%" change={+3.9} title="Conversion rate" />
    </BoardRow>
  </BoardRow>
</Board>

Column Wrapping

Columns automatically wrap on to new lines as the viewport narrows. The wrapping behavior for a row with four columns and four components is shown below.

Important
Use the draggable split handle to resize the layout and see how the columns wrap.
Open in a
new tab
<SplitLayout className="board-column-wrapping">
  <Board style={{ width: '100%' }}>
    <BoardRow className="row">
      <div className="cell color">Cell 1</div>
      <div className="cell color">Cell 2</div>
      <div className="cell color">Cell 3</div>
      <div className="cell color">Cell 4</div>
    </BoardRow>
  </Board>
  <div></div>
</SplitLayout>

Column Span

By default, the components in a row share the space equally. A component can be made to stretch across two or three columns by setting its column span.

The possible combinations are shown below:

Open in a
new tab
<Board className="board-column-span">
  <BoardRow>
    <div className="cell" {...{ 'board-cols': '2' }}>
      Span 2
    </div>
    <div className="cell">Span 1</div>
    <div className="cell">Span 1</div>
  </BoardRow>
  <BoardRow>
    <div className="cell">Span 1</div>
    <div className="cell" {...{ 'board-cols': '2' }}>
      Span 2
    </div>
    <div className="cell">Span 1</div>
  </BoardRow>
  <BoardRow>
    <div className="cell">Span 1</div>
    <div className="cell">Span 1</div>
    <div className="cell" {...{ 'board-cols': '2' }}>
      Span 2
    </div>
  </BoardRow>
</Board>

<Board className="board-column-span">
  <BoardRow>
    <div className="cell" {...{ 'board-cols': '3' }}>
      Span 3
    </div>
    <div className="cell">Span 1</div>
  </BoardRow>
  <BoardRow>
    <div className="cell">Span 1</div>
    <div className="cell" {...{ 'board-cols': '3' }}>
      Span 3
    </div>
  </BoardRow>
</Board>

<Board className="board-column-span">
  <BoardRow>
    <div className="cell" {...{ 'board-cols': '2' }}>
      Span 2
    </div>
    <div className="cell">Span 1</div>
  </BoardRow>
  <BoardRow>
    <div className="cell">Span 1</div>
    <div className="cell" {...{ 'board-cols': '2' }}>
      Span 2
    </div>
  </BoardRow>
</Board>

Breakpoints

Board adjusts its layout based on the layout container width. The following three container widths, called breakpoints, trigger a layout change:

Breakpoint Container width Max number of columns

large

≥ 960 pixels

4

medium

600–959 pixels

2 or 3[1]

small

< 600 pixels

1

Breakpoints can be customized by overriding the CSS custom properties --vaadin-board-width-small and --vaadin-board-width-medium.

Breakpoint-Specific Styling

You can apply different styles for each breakpoint, for example to change the font size and space between components.

Important
Use the draggable split handle to resize the layout and see how the board styling changes at different breakpoints.
Open in a
new tab
return (
  <SplitLayout className="board-breakpoints">
    <Board style={{ width: '100%' }}>
      <BoardRow>
        <div className="cell">Cell 1</div>
        <div className="cell">Cell 2</div>
        <div className="cell">Cell 3</div>
        <div className="cell">Cell 4</div>
      </BoardRow>
    </Board>
    <div></div>
  </SplitLayout>
);

1. A row with three equal-width components doesn’t wrap until the small breakpoint.