GridLayoutItem
Represents the KendoReact GridLayoutItem component.
Definition
Package:@progress/kendo-react-layout
Properties Interface:GridLayoutItemProps
Syntax:
const App = () => {
return (
<GridLayout
rows={[{height: 50}, {height: 50}, {height: 50}]}
cols={[{width: 50}, {width: 50}, {width: 50}]}
gap={{rows: 5, cols: 5}}
align={{horizontal: 'stretch', vertical: 'stretch'}}
>
<GridLayoutItem row={1} col={1}>Box</GridLayoutItem>
<GridLayoutItem row={1} col={2} colSpan={2}>Box</GridLayoutItem>
<GridLayoutItem row={2} col={1} colSpan={2} rowSpan={2}>Box</GridLayoutItem>
<GridLayoutItem row={2} col={3}>Box</GridLayoutItem>
<GridLayoutItem row={3} col={3}>Box</GridLayoutItem>
</GridLayout>
);
};
Properties
children?
ReactNode
The React elements that will be rendered inside the GridLayoutItem (see example).
Example:
<GridLayoutItem>Content</GridLayoutItem>
className?
string
Sets additional CSS classes to the GridLayoutItem (see example).
Example:
<GridLayoutItem className="custom-class" />
col?
number
Defines the column line from which the element will start (see example).
Example:
<GridLayoutItem col={1} />
colSpan?
number
Specifies the number of columns over which the element will span (see example).
Defaults to 1.
Example:
<GridLayoutItem colSpan={2} />
id?
string
Sets the id property of the root GridLayoutItem element (see example).
Example:
<GridLayoutItem id="item-1" />
row?
number
Defines the row line from which the element will start (see example).
Example:
<GridLayoutItem row={1} />
rowSpan?
number
Specifies the number of rows over which the element will span (see example).
Defaults to 1.
Example:
<GridLayoutItem rowSpan={2} />
style?
CSSProperties
Sets additional CSS styles to the GridLayoutItem (see example).
Example:
<GridLayoutItem style={{ backgroundColor: 'red' }} />
References
Represents the Object which is passed to the ref
callback of the GridLayoutItem component.