FlowLayout class
A layout that spreads elements horizontally and wraps them across multiple rows, as needed.
Constructors
Flow |
Properties
column |
The space between items. |
horizontal |
Controls how the content of the container should be horizontally aligned. |
item |
Controls how item should fit inside the container. |
item |
The width, in pixels, of each item, in the <number>px format. Should not be used if maxItemWidth and/or minItemWidth are set. Example
|
max |
The maximum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set. Example
|
min |
The minimum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set. Example
|
row |
The space between rows of items. |
target |
Controls for which card width the layout should be used. |
type | |
vertical |
Controls how the content of the container should be vertically aligned. |
Methods
Constructor Details
FlowLayout(FlowLayoutOptions)
Property Details
columnSpacing
horizontalItemsAlignment
Controls how the content of the container should be horizontally aligned.
horizontalItemsAlignment?: HorizontalAlignment
Property Value
itemFit
Controls how item should fit inside the container.
itemFit?: "Fit" | "Fill"
Property Value
"Fit" | "Fill"
itemWidth
The width, in pixels, of each item, in the <number>px format. Should not be used if maxItemWidth and/or minItemWidth are set.
Example
'<number>px'
itemWidth?: string
Property Value
string
maxItemWidth
The maximum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set.
Example
'<number>px'
maxItemWidth?: string
Property Value
string
minItemWidth
The minimum width, in pixels, of each item, in the <number>px format. Should not be used if itemWidth is set.
Example
'<number>px'
minItemWidth?: string
Property Value
string
rowSpacing
targetWidth
Controls for which card width the layout should be used.
targetWidth?: TargetWidth
Property Value
type
type: "Layout.Flow"
Property Value
"Layout.Flow"
verticalItemsAlignment
Controls how the content of the container should be vertically aligned.
verticalItemsAlignment?: VerticalAlignment
Property Value
Method Details
from(FlowLayoutOptions)
static function from(options: FlowLayoutOptions): FlowLayout
Parameters
- options
- FlowLayoutOptions
Returns
withColumnSpacing(Spacing)
withHorizontalAlignment(HorizontalAlignment)
function withHorizontalAlignment(value: HorizontalAlignment): FlowLayout
Parameters
- value
- HorizontalAlignment
Returns
withItemFit("Fit" | "Fill")
function withItemFit(value: "Fit" | "Fill"): FlowLayout
Parameters
- value
-
"Fit" | "Fill"
Returns
withItemMaxWidth(string)
withItemMinWidth(string)
withItemWidth(string)
withRowSpacing(Spacing)
withTargetWidth(TargetWidth)
withVerticalAlignment(VerticalAlignment)
function withVerticalAlignment(value: VerticalAlignment): FlowLayout
Parameters
- value
- VerticalAlignment