New to KendoReactStart a free 30-day trial

Represents the props of the KendoReact GridLayout component.

Definition

Package:@progress/kendo-react-layout

Properties

Specifies the horizontal and vertical alignment of the inner GridLayout elements (see example).

The possible keys are:

  • horizontal—Defines the possible horizontal alignment of the inner GridLayout elements.
    • start—Uses the start point of the container.
    • center—Uses the central point of the container.
    • end—Uses the end point of the container.
    • (Default)stretch—Stretches the items to fill the width of the container.
  • vertical— Defines the possible vertical alignment of the inner GridLayout elements.
    • top—Uses the top point of the container.
    • middle—Uses the middle point of the container.
    • bottom—Uses the bottom point of the container.
    • (Default)stretch—Stretches the items to fill the height of the container.

Example:

jsx
<GridLayout align={{ horizontal: 'center', vertical: 'middle' }} />

children?

ReactNode

The React elements that will be rendered inside the GridLayout (see example).

Example:

jsx
<GridLayout>
  <div>Item 1</div>
  <div>Item 2</div>
</GridLayout>

Sets additional CSS classes to the GridLayout (see example).

Example:

jsx
<GridLayout className="custom-class" />

Specifies the default number of columns and their widths (see example).

Example:

jsx
<GridLayout cols={[{ width: '100px' }, { width: '200px' }]} />

Specifies the gaps between the elements (see example).

  • The possible keys are:
  • rows
  • columns

Example:

jsx
<GridLayout gap={{ rows: '10px', columns: '20px' }} />

id?

string

Sets the id property of the root GridLayout element (see example).

Example:

jsx
<GridLayout id="grid-layout" />

Specifies the default number of rows and their height (see example).

Example:

jsx
<GridLayout rows={[{ height: '50px' }, { height: '100px' }]} />

style?

CSSProperties

Sets additional CSS styles to the GridLayout (see example).

Example:

jsx
<GridLayout style={{ gap: '10px' }} />