components
Grid & Column
The foundational 12-column layout atoms for strict geometric structure.
The Grid and Column atoms are the bedrock of the Curva & Concreto layout system. They enforce a strict 12-column geometry, ensuring that content aligns cleanly without arbitrary padding values scattered across feature code.
Grids are the ultimate “Concreto”. They establish the invisible sharp lines upon which all other elements rest. They do not have visual boundaries themselves, but they strictly enforce the spatial boundaries of their children.
Basic Usage
By default, <Grid> creates a 12-column CSS Grid container. <Column> spans all 12 columns on mobile, but you can override this for larger breakpoints using sm, md, and lg.
<Grid gap="1rem"> <Column span={12} md={6} lg={4}> <div style="background: var(--papel-20); padding: 1rem; border-radius: var(--r-1);">Col 1</div> </Column> <Column span={12} md={6} lg={4}> <div style="background: var(--papel-20); padding: 1rem; border-radius: var(--r-1);">Col 2</div> </Column> <Column span={12} md={12} lg={4}> <div style="background: var(--papel-20); padding: 1rem; border-radius: var(--r-1);">Col 3</div> </Column></Grid>Offsets
You can use the start prop on a Column to offset it within the grid. This is particularly useful for centering content or creating asymmetrical layouts.
<Grid> <Column span={8} start={3}> <div style="background: var(--azul-soft); padding: 1rem;">Centered 8-col</div> </Column></Grid>Semantic Containers
Both Grid and Column accept an as prop to change their underlying HTML element, ensuring you don’t sacrifice document semantics for visual layout.
<Grid as="section"> <Column as="article" span={12}>...</Column></Grid>Props
Grid
| Name | Type | Default | Description |
|---|---|---|---|
columns | number | 12 | Number of columns in the grid. |
gap | string | "2rem" | Gap between grid items. Uses standard CSS units. |
as | string | "div" | HTML element to render. Options: div, section, article, main, form, fieldset. |
class | string | "" | Additional CSS classes. |
Column
| Name | Type | Default | Description |
|---|---|---|---|
span | number | 12 | Columns to span on mobile (default). |
sm | number | undefined | Columns to span on tablet (>= 480px). |
md | number | undefined | Columns to span on larger tablet (>= 768px). |
lg | number | undefined | Columns to span on desktop (>= 1024px). |
start | number | undefined | Column line to start at (for offsets). |
as | string | "div" | HTML element to render. |
class | string | "" | Additional CSS classes. |