Skip to content

Grid ​

Responsive Grid

Loading...
  • Tag: <flint-grid>
  • Class: FlintGrid

Import ​

ts
import 'flint-ui'; // auto-registers all
// or
import { FlintGrid } from 'flint-ui';

Usage ​

html
<flint-grid></flint-grid>

Properties ​

PropertyAttributeTypeDefaultDescription
containercontainerbooleanfalseWhether this element acts as a grid container.
directiondirection'row' | 'row-reverse' | 'column' | 'column-reverse''row'Flex direction of the grid container.
wrapwrap'nowrap' | 'wrap' | 'wrap-reverse''wrap'Flex wrap behavior of the grid container.
alignItemsalign-items'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline'—Cross-axis alignment of grid items.
justifyContentjustify-content'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly'—Main-axis alignment of grid items.
columnscolumnsnumber12Total number of columns. Default is 12.
spacingspacingResponsiveValue&lt;number | string&gt;0Spacing between items. 1 unit = 8px. Accepts a number, a string pixel value, or a responsive object.
rowSpacingrow-spacingResponsiveValue&lt;number | string&gt;—Row spacing override; takes precedence over spacing for the row axis.
columnSpacingcolumn-spacingResponsiveValue&lt;number | string&gt;—Column spacing override; takes precedence over spacing for the column axis.
xsxsGridSize—Number of columns to span at the xs breakpoint.
smsmGridSize—Number of columns to span at the sm breakpoint.
mdmdGridSize—Number of columns to span at the md breakpoint.
lglgGridSize—Number of columns to span at the lg breakpoint.
xlxlGridSize—Number of columns to span at the xl breakpoint.
offsetoffsetPartial&lt;Record&lt;Breakpoint, number | 'auto'&gt;&gt;—Offset per breakpoint, expressed in column units or 'auto'.
orderorderResponsiveValue&lt;number&gt;—Flex order. Supports responsive values so items can be reordered at specific breakpoints (e.g. push a sidebar above content on mobile).

Slots ​

NameDescription
(default)Default slot for content