mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
f42c3bf790
* Document nested accordions and Column sub-component Generated-By: mintlify-agent * Apply suggestion from @ethanpalm * Apply suggestion from @ethanpalm --------- Co-authored-by: mintlify-development[bot] <109878554+mintlify-development[bot]@users.noreply.github.com> Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
84 lines
1.8 KiB
Plaintext
84 lines
1.8 KiB
Plaintext
---
|
|
title: 'Columns'
|
|
description: "Arrange cards and other components in a responsive grid layout with customizable column counts."
|
|
keywords: ['card groups', 'grid layout', 'multi-column layout']
|
|
---
|
|
|
|
The `Columns` component lets you arrange content in a responsive grid layout. It's most often used to put cards in a grid, by specifying the number of grid columns. You can also use the `Column` sub-component to wrap arbitrary content. Columns are responsive and automatically adjust for smaller screens.
|
|
|
|
<Columns cols={2}>
|
|
<Card title="Get started" icon="rocket">
|
|
Set up your project with our quickstart guide.
|
|
</Card>
|
|
<Card title="API reference" icon="code">
|
|
Explore endpoints, parameters, and examples for your API.
|
|
</Card>
|
|
</Columns>
|
|
|
|
```mdx Columns example
|
|
<Columns cols={2}>
|
|
<Card title="Get started">
|
|
Set up your project with our quickstart guide.
|
|
</Card>
|
|
<Card title="API reference">
|
|
Explore endpoints, parameters, and examples for your API.
|
|
</Card>
|
|
</Columns>
|
|
```
|
|
|
|
## Column sub-component
|
|
|
|
Use the `Column` component to wrap text or code in individual columns. This is useful when you want to display arbitrary content side by side, not just cards or other components.
|
|
|
|
<Columns cols={2}>
|
|
<Column>
|
|
|
|
**Installation**
|
|
|
|
```bash
|
|
npm install my-package
|
|
```
|
|
|
|
</Column>
|
|
<Column>
|
|
|
|
**Usage**
|
|
|
|
```javascript
|
|
import { init } from 'my-package';
|
|
init();
|
|
```
|
|
|
|
</Column>
|
|
</Columns>
|
|
|
|
````mdx Column sub-component example
|
|
<Columns cols={2}>
|
|
<Column>
|
|
|
|
**Installation**
|
|
|
|
```bash
|
|
npm install my-package
|
|
```
|
|
|
|
</Column>
|
|
<Column>
|
|
|
|
**Usage**
|
|
|
|
```javascript
|
|
import { init } from 'my-package';
|
|
init();
|
|
```
|
|
|
|
</Column>
|
|
</Columns>
|
|
````
|
|
|
|
## Properties
|
|
|
|
<ResponseField name="cols" type="number" default={2}>
|
|
The number of columns per row. Accepts values from 1 to 4.
|
|
</ResponseField>
|