New to KendoReactLearn about KendoReact Free.

GridLayoutProps

Updated over 6 months ago

Represents the props of the KendoReact GridLayout component.

NameTypeDefaultDescription

align?

GridLayoutAlign

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?

React.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>

className?

string

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

Example:

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

cols?

GridLayoutColumnProps[]

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

Example:

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

gap?

GridLayoutGap

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" />

rows?

GridLayoutRowProps[]

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

Example:

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

style?

React.CSSProperties

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

Example:

jsx
<GridLayout style={{ gap: '10px' }} />
Not finding the help you need?
Contact Support