StackLayout
Represents the KendoReact StackLayout component. Arranges its inner elements horizontally, or vertically in a stack. Nesting stack layouts is supported to build more complex layouts.
Definition
Package:@progress/kendo-react-layout
Properties Interface:StackLayoutProps
Syntax:
const App = () => {
return (
<StackLayout
orientation="vertical"
align={{horizontal: 'stretch', vertical: 'stretch'}}
gap={10}
>
<div>Box</div>
<div>Box</div>
<div>Box</div>
<div>Box</div>
</StackLayout>
);
};
Properties
Specifies the horizontal and vertical alignment of the inner StackLayout elements. Demo (here) and (here).
The possible keys are:
horizontal—Defines the possible horizontal alignment of the inner StackLayout 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 StackLayout 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.
children?
ReactNode
The React elements that will be rendered inside the StackLayout.
className?
string
Sets additional CSS classes to the StackLayout.
gap?
string | number
Specifies the gap between the inner elements (see example).
id?
string
Sets the id property of the root StackLayout element.
Specifies the StackLayout orientation. (see example).
The possible values are:
- (Default)
horizontal vertical
horizontal
style?
CSSProperties
Sets additional CSS styles to the StackLayout.
References
Represents the Object which is passed to the ref
callback of the StackLayout component.