SkyFluidGridModule
@skyux/layout
npm install --save-exact @skyux/layout
Wraps the fluid grid to ensure proper spacing. Without the wrapper, the alignment, padding, and margins do not behave as expected.
sky-fluid-grid
Input | Description |
---|---|
disableMargin?: boolean | Disables the outer left and right margin of the fluid grid container. Optional. Default is false |
gutterSize?: SkyFluidGridGutterSizeType | The type that defines the size of the padding between columns. Optional. Default is "large" |
Displays a row within the sky-fluid-grid
wrapper. Previously, you could display a row
without a wrapper, but we no longer officially support that option.
sky-row
Input | Description |
---|---|
reverseColumnOrder?: boolean | Whether to reverse the display order for columns in the row. Optional. Default is false |
Displays a column within a row of the fluid grid.
sky-column
Input | Description |
---|---|
screenLarge?: number | The number of columns (1-12) on large screens
(more than 1200px). If you do not specify a value, the column
inherits the Optional. |
screenMedium?: number | The number of columns (1-12) on medium screens
(992-1199px). If you do not specify a value, the column inherits
the Optional. |
screenSmall?: number | The number of columns (1-12) on small screens
(768-991px). If you do not specify a value, the column inherits
the Optional. |
screenXSmall?: number | The number of columns (1-12) on extra-small screens (less than 768px). If you do not specify a value, the fluid grid displays the column at the full width of the screen. Optional. Default is 12 |
<div class="highlight-columns">
<sky-fluid-grid>
<sky-row>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="3"> [screenSmall]="3" </sky-column>
<sky-column [screenSmall]="3"> [screenSmall]="3" </sky-column>
<sky-column [screenSmall]="3"> [screenSmall]="3" </sky-column>
<sky-column [screenSmall]="3"> [screenSmall]="3" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="4"> [screenSmall]="4" </sky-column>
<sky-column [screenSmall]="4"> [screenSmall]="4" </sky-column>
<sky-column [screenSmall]="4"> [screenSmall]="4" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="5"> [screenSmall]="5" </sky-column>
<sky-column [screenSmall]="7"> [screenSmall]="7" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="6"> [screenSmall]="6" </sky-column>
<sky-column [screenSmall]="6"> [screenSmall]="6" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="8"> [screenSmall]="8" </sky-column>
<sky-column [screenSmall]="4"> [screenSmall]="4" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="9"> [screenSmall]="9" </sky-column>
<sky-column [screenSmall]="3"> [screenSmall]="3" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="10"> [screenSmall]="10" </sky-column>
<sky-column [screenSmall]="2"> [screenSmall]="2" </sky-column>
</sky-row>
<sky-row>
<sky-column [screenSmall]="11"> [screenSmall]="11" </sky-column>
<sky-column [screenSmall]="1"> [screenSmall]="1" </sky-column>
</sky-row>
<sky-row>
<sky-column
[screenXSmall]="6"
[screenSmall]="8"
[screenMedium]="9"
[screenLarge]="10"
>
[screenXSmall]="6" [screenSmall]="8" [screenMedium]="9"
[screenLarge]="10"
</sky-column>
<sky-column
[screenXSmall]="6"
[screenSmall]="4"
[screenMedium]="3"
[screenLarge]="2"
>
[screenXSmall]="6" [screenSmall]="4" [screenMedium]="3"
[screenLarge]="2"
</sky-column>
</sky-row>
<sky-row [reverseColumnOrder]="true">
<sky-column [screenSmall]="4"> First column </sky-column>
<sky-column [screenSmall]="4"> Second column </sky-column>
<sky-column [screenSmall]="4"> Third column </sky-column>
</sky-row>
</sky-fluid-grid>
</div>
import { Component } from '@angular/core';
import { SkyFluidGridModule } from '@skyux/layout';
@Component({
standalone: true,
selector: 'app-demo',
templateUrl: './demo.component.html',
styles: [
`
.highlight-columns .sky-column {
background-color: #97eced;
border: 1px solid #56e0e1;
overflow-wrap: break-word;
}
`,
],
imports: [SkyFluidGridModule],
})
export class DemoComponent {}