You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: website/pages/grid.mdx
+40-4Lines changed: 40 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
importSEOfrom"../components/SEO";
1
+
importSEOfrom'../components/SEO'
2
2
3
3
<SEO
4
4
title="Grid"
@@ -15,10 +15,9 @@ comes with helpful style shorthand. It renders a `div` element.
15
15
## Import
16
16
17
17
```js
18
-
import { CGrid} from"@chakra-ui/vue";
18
+
import { CGrid, CGridItem} from'@chakra-ui/vue'
19
19
```
20
20
21
-
22
21
## Usage
23
22
24
23
Using the `Grid` component, here are some helpful shorthand props:
@@ -51,6 +50,43 @@ time.
51
50
</c-grid>
52
51
```
53
52
53
+
## Spanning Columns
54
+
55
+
In some layouts, you may need certain grid items to span specific amount of columns or rows instead of an even distribution. To achieve this, you need to pass the `colSpan` prop to the `CGridItem` component to span across columns and also pass the `rowSpan` component to span across rows. You also need to specify the `templateColumns` and `templateRows`.
> `CGrid` composes the `CBox` component. So it accepts all Box props along with the related CSS grid props. See [Box](/box#props) component for list of props
79
+
> `CGrid` composes the `CBox` component. So it accepts all Box props along with the related CSS grid props. See [Box](/box#props) component for list of props
80
+
81
+
### `CGridItem` Props
82
+
83
+
> `CGridItem` composes `CBox` so you can pass all `CBox` props.
0 commit comments