mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
6c53a28e3a
* Document className and Tailwind arbitrary value support All built-in components now accept a className prop (mint#10540), and dynamic Tailwind utilities work in className on MDX components (mint#6737). Two pages stated the opposite. - Correct the claims that Tailwind arbitrary values are unsupported in customize/custom-scripts and guides/custom-layouts - Add className and arbitrary value guidance to the Tailwind section of custom-scripts, including the runtime-class limitation and the Tab content-panel caveat - Add a Style components section to the components overview - Add className property rows to every component reference page that supports it, and note the three components that do not - Document inline Markdown support in component title props - Correct the callouts page, which said typed callouts accept only children - Replace inline style resizing with Tailwind classes in image embeds - Add a help center article for Tailwind classes not applying in the editor's live preview, and note the limitation in custom-layouts - Point skill.md at className before custom.css - Accept className, keyframes, and unstyled in the Vale vocabulary Resolves DOC-316, DOC-317 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Apply batched suggestions from code review Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> * Apply batched suggestions from code review Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
89 lines
2.0 KiB
Plaintext
89 lines
2.0 KiB
Plaintext
---
|
|
title: 'Columns'
|
|
description: "Arrange cards and other components in a responsive multi-column grid layout with the columns component, including customizable column counts."
|
|
keywords: ['card groups', 'grid layout', 'multi-column layout']
|
|
boost: 3
|
|
---
|
|
|
|
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>
|
|
|
|
<ResponseField name="className" type="string">
|
|
Additional CSS classes to apply to the columns container.
|
|
</ResponseField>
|