Grid
Inkline’s grid system is modelled as a 12 columns layout using flexbox, with equally divided columns, separated by a small gutter.
The grid system uses percentage widths, so that it is usable at any nesting level.
The grid system is defined using <i-container>, <i-row> and <i-column> components, with each one having specific responsive modifiers. Here’s how it works:
- First, we define a row with a set of columns inside of it.
- Your content elements should be placed directly in a
<i-column>, and only<i-column>should be placed directly inside an<i-row>component - The column width takes a value of 1-12 at each responsive breakpoint (
xs,sm,md,lg,xl,xxl). - If the sum of
columnwidths in a row is more than 12, then the overflowing column will start on a new line.
Basic Example
Create basic grid layout using columns.
Grid Offset
Grid offsets are used to move a column to the right without creating an empty column next to it.
You may need to use offset="0" and offset-{breakpoint}="0" to clear an offset. See this in action in the grid example below.
Grid Push / Pull
Code-wise, the columns have a different order.
You may need to use push="0", push-{breakpoint}="0", pull="0", pull-{breakpoint}="0" to clear a push or pull.
Auto Width
The grid will automatically fit any number of auto sizing columns to a row.
Nested Grid
Inkline allows you to nest up to 12 columns inside a row. Row can also be nested inside any column, giving you virtually endless layout possibilities. You can place rows only inside a container or a column, while you can place columns only inside a row.
Horizontal Alignment
You can align columns horizontally to the start, center, or end of a row.
start
You can use start-{breakpoint} to target screen sizes starting from a specific breakpoint.
center
You can use center-{breakpoint} to target screen sizes starting from a specific breakpoint.
end
You can use end-{breakpoint} to target screen sizes starting from a specific breakpoint.
Vertical Alignment
You can align columns vertically to the top, middle or bottom of the row.
top
You can use top-{breakpoint} to target screen sizes starting from a specific breakpoint.
middle
You can use middle-{breakpoint} to target screen sizes starting from a specific breakpoint.
bottom
You can use bottom-{breakpoint} to target screen sizes starting from a specific breakpoint.
Distribution
Distribute the spacing between the columns of a row.
around
You can use around-{breakpoint} to target screen sizes starting from a specific breakpoint.
between
You can use between-{breakpoint} to target screen sizes starting from a specific breakpoint.
Reordering
Reorder columns using helper classes.
reverse
You can use reverse-{breakpoint} to target screen sizes starting from a specific breakpoint.
first
You can use first-{breakpoint} to target screen sizes starting from a specific breakpoint.
last
You can use last-{breakpoint} to target screen sizes starting from a specific breakpoint.
Responsive Width
You can specify column counts for each breakpoint. Try to resize your browser window!
Fluid Container
You can make the <i-container> component fill the whole width of the parent element using the fluid property.
Configuration
Props
Use props to modify the component’s design and behavior.
<i-container>- Property
fluidTypeBooleanDefaultfalseDescription Display the container as fluid, always spanning 100% width
<i-row>- Property
startTypeBooleanDefaultfalseDescription Justify the content to the start of the row - Property
start-xsTypeBooleanDefaultfalseDescription Justify the content to the start of the row on extra-small screens - Property
start-smTypeBooleanDefaultfalseDescription Justify the content to the start of the row on small screens - Property
start-mdTypeBooleanDefaultfalseDescription Justify the content to the start of the row on medium screens - Property
start-lgTypeBooleanDefaultfalseDescription Justify the content to the start of the row on large screens - Property
start-xlTypeBooleanDefaultfalseDescription Justify the content to the start of the row on extra-large screens - Property
start-xxlTypeBooleanDefaultfalseDescription Justify the content to the start of the row on extra-extra-large screens - Property
centerTypeBooleanDefaultfalseDescription Justify the content to the center of the row - Property
center-xsTypeBooleanDefaultfalseDescription Justify the content to the center of the row on extra-small screens - Property
center-smTypeBooleanDefaultfalseDescription Justify the content to the center of the row on small screens - Property
center-mdTypeBooleanDefaultfalseDescription Justify the content to the center of the row on medium screens - Property
center-lgTypeBooleanDefaultfalseDescription Justify the content to the center of the row on large screens - Property
center-xlTypeBooleanDefaultfalseDescription Justify the content to the center of the row on extra-large screens - Property
center-xxlTypeBooleanDefaultfalseDescription Justify the content to the center of the row on extra-extra-large screens - Property
endTypeBooleanDefaultfalseDescription Justify the content to the end of the row - Property
end-xsTypeBooleanDefaultfalseDescription Justify the content to the end of the row on extra-small screens - Property
end-smTypeBooleanDefaultfalseDescription Justify the content to the end of the row on small screens - Property
end-mdTypeBooleanDefaultfalseDescription Justify the content to the end of the row on medium screens - Property
end-lgTypeBooleanDefaultfalseDescription Justify the content to the end of the row on large screens - Property
end-xlTypeBooleanDefaultfalseDescription Justify the content to the end of the row on extra-large screens - Property
end-xxlTypeBooleanDefaultfalseDescription Justify the content to the end of the row on extra-extra-large screens - Property
topTypeBooleanDefaultfalseDescription Align the content to the top of the row - Property
top-xsTypeBooleanDefaultfalseDescription Align the content to the top of the row on extra-small screens - Property
top-smTypeBooleanDefaultfalseDescription Align the content to the top of the row on small screens - Property
top-mdTypeBooleanDefaultfalseDescription Align the content to the top of the row on medium screens - Property
top-lgTypeBooleanDefaultfalseDescription Align the content to the top of the row on large screens - Property
top-xlTypeBooleanDefaultfalseDescription Align the content to the top of the row on extra-large screens - Property
top-xxlTypeBooleanDefaultfalseDescription Align the content to the top of the row on extra-extra-large screens - Property
middleTypeBooleanDefaultfalseDescription Align the content to the middle of the row - Property
middle-xsTypeBooleanDefaultfalseDescription Align the content to the middle of the row on extra-small screens - Property
middle-smTypeBooleanDefaultfalseDescription Align the content to the middle of the row on small screens - Property
middle-mdTypeBooleanDefaultfalseDescription Align the content to the middle of the row on medium screens - Property
middle-lgTypeBooleanDefaultfalseDescription Align the content to the middle of the row on large screens - Property
middle-xlTypeBooleanDefaultfalseDescription Align the content to the middle of the row on extra-large screens - Property
middle-xxlTypeBooleanDefaultfalseDescription Align the content to the middle of the row on extra-extra-large screens - Property
bottomTypeBooleanDefaultfalseDescription Align the content to the bottom of the row - Property
bottom-xsTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on extra-small screens - Property
bottom-smTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on small screens - Property
bottom-mdTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on medium screens - Property
bottom-lgTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on large screens - Property
bottom-xlTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on extra-large screens - Property
bottom-xxlTypeBooleanDefaultfalseDescription Align the content to the bottom of the row on extra-extra-large screens - Property
aroundTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row - Property
around-xsTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on extra-small screens - Property
around-smTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on small screens - Property
around-mdTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on medium screens - Property
around-lgTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on large screens - Property
around-xlTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on extra-large screens - Property
around-xxlTypeBooleanDefaultfalseDescription Justify the content to have space around each item inside the row on extra-extra-large screens - Property
betweenTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row - Property
between-xsTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on extra-small screens - Property
between-smTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on small screens - Property
between-mdTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on medium screens - Property
between-lgTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on large screens - Property
between-xlTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on extra-large screens - Property
between-xxlTypeBooleanDefaultfalseDescription Justify the content to have space between each item inside the row on extra-extra-large screens - Property
reverseTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row - Property
reverse-xsTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on extra-small screens - Property
reverse-smTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on small screens - Property
reverse-mdTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on medium screens - Property
reverse-lgTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on large screens - Property
reverse-xlTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on extra-large screens - Property
reverse-xxlTypeBooleanDefaultfalseDescription Order the content in reverse order inside the row on extra-extra-large screens
<i-column>- Property
xsTypeBoolean | String | NumberDefault''Description The number of columns to span for extra-small screen sizes. Setting the prop to true will set the width automatically - Property
smTypeBoolean | String | NumberDefault''Description The number of columns to span for small screen sizes. Setting the prop to true will set the width automatically - Property
mdTypeBoolean | String | NumberDefault''Description The number of columns to span for medium screen sizes. Setting the prop to true will set the width automatically - Property
lgTypeBoolean | String | NumberDefault''Description The number of columns to span for large screen sizes. Setting the prop to true will set the width automatically - Property
xlTypeBoolean | String | NumberDefault''Description The number of columns to span for extra-large screen sizes. Setting the prop to true will set the width automatically - Property
xxlTypeBoolean | String | NumberDefault''Description The number of columns to span for extra-extra-large screen sizes. Setting the prop to true will set the width automatically - Property
firstTypeBooleanDefaultfalseDescription Display the column as the first column - Property
first-xsTypeBooleanDefaultfalseDescription Display the column as the first column on extra-small screens - Property
first-smTypeBooleanDefaultfalseDescription Display the column as the first column on small screens - Property
first-mdTypeBooleanDefaultfalseDescription Display the column as the first column on medium screens - Property
first-lgTypeBooleanDefaultfalseDescription Display the column as the first column on large screens - Property
first-xlTypeBooleanDefaultfalseDescription Display the column as the first column on extra-large screens - Property
first-xxlTypeBooleanDefaultfalseDescription Display the column as the first column on extra-extra-large screens - Property
lastTypeBooleanDefaultfalseDescription Display the column as the last column - Property
last-xsTypeBooleanDefaultfalseDescription Display the column as the last column on extra-small screens - Property
last-smTypeBooleanDefaultfalseDescription Display the column as the last column on small screens - Property
last-mdTypeBooleanDefaultfalseDescription Display the column as the last column on medium screens - Property
last-lgTypeBooleanDefaultfalseDescription Display the column as the last column on large screens - Property
last-xlTypeBooleanDefaultfalseDescription Display the column as the last column on extra-large screens - Property
last-xxlTypeBooleanDefaultfalseDescription Display the column as the last column on extra-extra-large screens - Property
offsetTypeString | NumberDefault''Description The number of columns to offset the column by - Property
offset-xsTypeString | NumberDefault''Description The number of columns to offset the column by on extra-small screens - Property
offset-smTypeString | NumberDefault''Description The number of columns to offset the column by on small screens - Property
offset-mdTypeString | NumberDefault''Description The number of columns to offset the column by on medium screens - Property
offset-lgTypeString | NumberDefault''Description The number of columns to offset the column by on large screens - Property
offset-xlTypeString | NumberDefault''Description The number of columns to offset the column by on extra-large screens - Property
offset-xxlTypeString | NumberDefault''Description The number of columns to offset the column by on extra-extra-large screens - Property
pushTypeString | NumberDefault''Description The number of columns to push the column by - Property
push-xsTypeString | NumberDefault''Description The number of columns to push the column by on extra-small screens - Property
push-smTypeString | NumberDefault''Description The number of columns to push the column by on small screens - Property
push-mdTypeString | NumberDefault''Description The number of columns to push the column by on medium screens - Property
push-lgTypeString | NumberDefault''Description The number of columns to push the column by on large screens - Property
push-xlTypeString | NumberDefault''Description The number of columns to push the column by on extra-large screens - Property
push-xxlTypeString | NumberDefault''Description The number of columns to push the column by on extra-extra-large screens - Property
pullTypeString | NumberDefault''Description The number of columns to pull the column by - Property
pull-xsTypeString | NumberDefault''Description The number of columns to pull the column by on extra-small screens - Property
pull-smTypeString | NumberDefault''Description The number of columns to pull the column by on small screens - Property
pull-mdTypeString | NumberDefault''Description The number of columns to pull the column by on medium screens - Property
pull-lgTypeString | NumberDefault''Description The number of columns to pull the column by on large screens - Property
pull-xlTypeString | NumberDefault''Description The number of columns to pull the column by on extra-large screens - Property
pull-xxlTypeString | NumberDefault''Description The number of columns to pull the column by on extra-extra-large screens
Slots
Use slots to insert custom content into well-defined component locations.
<i-container>- Property
defaultDescription Slot for default container content
<i-row>- Property
defaultDescription Slot for default row content
<i-column>- Property
defaultDescription Slot for default column content
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
<i-container>- Property
--width--xsValue100%Description The width of the container component on extrasmall screens - Property
--width--smValuecalc(#{breakpoint('sm')} - #{gutter('sm')})Description The width of the container component on small screens - Property
--width--mdValuecalc(#{breakpoint('md')} - #{gutter('md')})Description The width of the container component on medium screens - Property
--width--lgValuecalc(#{breakpoint('lg')} - #{gutter('lg')})Description The width of the container component on large screens - Property
--width--xlValuecalc(#{breakpoint('xl')} - #{gutter('xl')})Description The width of the container component on extralarge screens - Property
--width--xxlValuecalc(#{breakpoint('xxl')} - #{gutter('xxl')})Description The width of the container component on extralarge screens