Grid API

API reference for the Grid component: its props with their token values and defaults, the styled-system prop groups, and forwarded HTML attributes.

Demos

For usage examples, visit the component demo page: Grid

Import

import { Grid } from '@soroush.tech/design-system/Grid'

Grid-specific props

gap

Inherited from View. Resolves against theme.space. Maps to CSS gap (shorthand for row-gap + column-gap).

KeyCSS value
00
0.54px
18px
1.512px
216px
324px
432px
540px
648px
756px
864px
"auto"auto

Grid layout props

These map directly to CSS Grid properties and accept raw CSS strings - grid layout values (column sizes, area definitions, track counts) are structurally varied and can't be reduced to a fixed token set. See the MDN CSS Grid Layout reference for all valid values.

PropCSS property
gridTemplateColumnsgrid-template-columns
gridTemplateRowsgrid-template-rows
gridTemplateAreasgrid-template-areas
gridTemplategrid-template
gridAutoColumnsgrid-auto-columns
gridAutoRowsgrid-auto-rows
gridAutoFlowgrid-auto-flow
gridColumngrid-column
gridRowgrid-row
gridAreagrid-area
columnGapcolumn-gap
rowGaprow-gap
gridGapgap (alias)

Inherited from View

Space - theme.space

PropShorthand for
m mt mr mb ml mx mymargin + sides
p pt pr pb pl px pypadding + sides

Layout

width · height · minWidth · minHeight · maxWidth · maxHeight · display · overflow · overflowX · overflowY · verticalAlign


Color - theme.colors

PropCSS propertyScale
colorcolortheme.colors
bgbackground-colortheme.colors
TokenValue (dark)
"default"kineticSurface[100]
"primary"kineticGreen[500]
"secondary"cyberCyan[500]

Border - theme.radii

border · borderWidth · borderStyle · borderColor · borderRadius · borderTop · borderRight · borderBottom · borderLeft · borderX · borderY

Radii: "sm" (4px) · "md" (8px) · "lg" (16px)


Position

position · zIndex · top · right · bottom · left


Flexbox

alignItems · alignContent · justifyContent · justifyItems · flexDirection · flexWrap · flex · flexGrow · flexShrink · flexBasis · alignSelf · justifySelf · order


Source code

If this page does not answer your question, have a look at the implementation of the component for more detail.