Design concept
This section comes from the original Ant Design documentation.
In most business situations, Lqvrent UI needs to solve a lot of information storage problems within the design area, so based on 12 Grids System, we divided the design area into 24 sections.
We name the divided area 'box'. We suggest four boxes for horizontal arrangement at most, one at least. Boxes are proportional to the entire screen as shown in the picture above. To ensure a high level of visual comfort, we customize the typography inside of the box based on the box unit.
Description
Design grid system based on Ant Design.
Outline
This section comes from the original Ant Design documentation.
In the grid system, we define the frame outside the information area based on row
and column
, to ensure that every area can have stable arrangement.
Following is a brief look at how it works:
- Establish a set of
column
in the horizontal space defined byrow
(abbreviatedcol
) - Your content elements should be placed directly in the
col
, and onlycol
should be placed directly inrow
- The column grid system is a value of 1-24 to represent its range spans. For example, three columns of equal width can be created by
<div lui-col [luiSpan]="8" />
. - If the sum of
col
spans in arow
are more than 24, then the overflowingcol
as a whole will start a new line arrangement.
Our grid systems base on Flex layout to allow the elements within the parent to be aligned horizontally - left, center, right, wide arrangement, and decentralized arrangement. The Grid system also supports vertical alignment - top aligned, vertically centered, bottom-aligned. You can also define the order of elements by using order
.
Layout uses a 24 grid layout to define the width of each "box", but does not rigidly adhere to the grid layout.
Breakpoints
By default, the grid system will use the default Tailwind breakpoints.
If you didn't changed your breakpoints, the grid system will use the following breakpoints (in pixels, min width for each breakpoint):
const breakpoints = {
'sm': 640,
'md': 768,
'lg': 1024,
'xl': 1280,
'2xl': 1536,
};
If you changed your tailwind breakpoints, you can tell the library to use your breakpoints by providing the breakpoints
property in the global configuration.
Here is an example of how to provide your breakpoints:
import { LuiConfig, LuiConfigService, provideLuiConfig } from '@lqvrent-workspace/lqvrent-ui/core/config';
const config: LuiConfig = {
breakpoints: {
'sm': 640,
'md': 768,
'lg': 1024,
'xl': 1280,
'2xl': 1536,
},
// ...
};
@Component({
selector: 'app-root',
standalone: true,
imports: [
// ...
],
providers: [
provideLuiConfig(config),
],
templateUrl: './app.component.html',
})
export class AppComponent {
constructor() { }
}
API
View the default configuration for this component. Learn more about global configuration.
import { LuiGridModule } from '@lqvrent-workspace/lqvrent-ui/grid';
<div lui-row>
<div lui-col luiSpan="12">50%</div>
<div lui-col luiSpan="12">50%</div>
</div>
[lui-row]
Property | Description | Type | Default |
---|---|---|---|
[luiAlign] | Vertical alignment | 'top' | 'middle' | 'bottom' | - |
[luiJustify] | Horizontal alignment | 'start' | 'end' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | - |
[luiGutter] | spacing between grids, see the example below | string | number | object | [number, number] | [object, object] | 0 |
[lui-col]
Property | Description | Type | Default |
---|---|---|---|
[luiFlex] | Flex style | string | number | - |
[luiSpan] | Raster number of cells to occupy | number | 0 |
[luiOrder] | Raster order | number | 0 |
[luiOffset] | Number of cells to offset from the left | number | 0 |
[luiPush] | The number of cells that raster is moved to the left | number | 0 |
[luiPull] | The number of cells that raster is moved to the right | number | 0 |
[luiXs] | <640px and also default setting, could be a span value or an object containing above props | number |object | - |
[luiSm] | ≥640px , could be a span value or an object containing above props | number |object | - |
[luiMd] | ≥768px , could be a span value or an object containing above props | number |object | - |
[luiLg] | ≥1024px , could be a span value or an object containing above props | number |object | - |
[luiXl] | ≥1280px , could be a span value or an object containing above props | number |object | - |
[lui2xl] | ≥1536px , could be a span value or an object containing above props | number |object | - |