New to Kendo UI for Vue? Start a free 30-day trial

TileLayout

Component

Represents the Kendo UI for Vue TileLayout component. Use the TileLayout to arrange tiles in a grid that the user can reorder and resize.

Definition

Package:@progress/kendo-vue-layout

Properties Interface:TileLayoutProps

Syntax:

vue
<TileLayout
    :columns="3"
    :row-height="150"
    :gap="{ rows: 10, columns: 10 }"
    :auto-flow="'row dense'"
    :data-item-key="'id'"
    :items="[
        { id: 'revenue', headerText: 'Revenue', bodyText: '$48,200', defaultPosition: { col: 1, colSpan: 2 } },
        { id: 'orders', headerText: 'Orders', bodyText: '1,240', defaultPosition: { col: 3 } }
    ]"
    @reposition="onReposition"
/>

Properties

Controls how the auto-placement algorithm places items in the TileLayout (see example). For more information, see the grid-auto-flow CSS article.

The supported values are:

  • column
  • row
  • column dense
  • row dense
  • unset
Default:

column

columns?

number

Sets the number of columns (see example).

Default:

3

columnWidth?

string | number

Sets the width of the columns (see example). A number value sets the width in pixels. A string value accepts any CSS grid track size, such as '1fr'.

Default:

1fr

Sets the field of the TileLayout item that holds its unique key. The TileLayout uses this value as the key of each tile.

dir?

string

Sets the dir HTML attribute of the TileLayout. Use it to switch between LTR and RTL.

Sets the gaps between the tiles (see example).

The supported keys are:

  • rows
  • columns

id?

string

Sets the id attribute of the root TileLayout element.

Sets a callback that decides if the user can drag a tile, based on the DOM event. Return true to ignore the drag. For example, :ignoreDrag="$event => !$event.target.closest('.k-card-title')" lets you drag the tiles only by their headers. :ignoreDrag="$event => $event.target.nodeName == 'INPUT'" ignores the drag when it starts from an input element.

Parameters:eventanyReturns:

boolean

Sets the collection of items that the TileLayout renders (see example).

Fires when the user moves a tile by dragging or resizing it (see example).

Sets the positions of the tiles when you use the TileLayout in controlled mode (see example).

rowHeight?

string | number

Sets the height of the rows (see example). A number value sets the height in pixels. A string value accepts any CSS grid track size, such as '1fr'.

Default:

1fr