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
4.6 KiB
Plaintext
89 lines
4.6 KiB
Plaintext
---
|
||
title: "Tiles"
|
||
description: "Use the tiles component to display visual previews with image thumbnails, titles, and descriptions in a responsive grid layout for your docs."
|
||
keywords: ["tiles", "visual preview", "grid", "showcase"]
|
||
boost: 3
|
||
---
|
||
|
||
Use tiles to create visual showcase elements with a patterned background, title, and description. Tiles are ideal for displaying component previews, feature highlights, or navigation items in a grid layout.
|
||
|
||
<Tile href="/components/tiles" title="Tile title" description="Short description">
|
||
<img src="/images/tiles/placeholder-light.svg" alt="Tile preview placeholder" className="block dark:hidden" />
|
||
<img src="/images/tiles/placeholder-dark.svg" alt="Tile preview placeholder (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
|
||
```mdx Tile example
|
||
<Tile href="/your-link" title="Tile title" description="Short description">
|
||
<img src="/images/your-preview-light.svg" alt="Tile preview" className="block dark:hidden" />
|
||
<img src="/images/your-preview-dark.svg" alt="Tile preview (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
```
|
||
|
||
Tiles can contain any image, SVG, or other React node that you want to display in the preview area. Provide separate light and dark mode assets using the `block dark:hidden` and `hidden dark:block` utility classes so the preview matches the active theme.
|
||
|
||
The tile preview area is a fixed-height, responsive container.
|
||
|
||
- **Aspect ratio**: Use a 16:9 or 4:3 landscape ratio.
|
||
- **Dimensions**: Design for at least 800×450 pixels.
|
||
- **Format**: Prefer SVG for illustrations, UI mockups, and diagrams. Use WebP or PNG for photographs and screenshots.
|
||
- **File size**: Keep each asset under 200 KB to preserve page load performance, especially in multi-tile grids.
|
||
- **Padding**: Include any surrounding padding in the asset. The tile does not add internal margin around the child image.
|
||
|
||
## Grid layout
|
||
|
||
Combine tiles with the [columns component](/components/columns) to create a responsive grid of visual previews.
|
||
|
||
<Columns cols={3}>
|
||
<Tile href="/components/tiles" title="Tile one" description="Short description">
|
||
<img src="/images/tiles/placeholder-light.svg" alt="Tile preview placeholder" className="block dark:hidden" />
|
||
<img src="/images/tiles/placeholder-dark.svg" alt="Tile preview placeholder (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
<Tile href="/components/tiles" title="Tile two" description="Short description">
|
||
<img src="/images/tiles/placeholder-light.svg" alt="Tile preview placeholder" className="block dark:hidden" />
|
||
<img src="/images/tiles/placeholder-dark.svg" alt="Tile preview placeholder (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
<Tile href="/components/tiles" title="Tile three" description="Short description">
|
||
<img src="/images/tiles/placeholder-light.svg" alt="Tile preview placeholder" className="block dark:hidden" />
|
||
<img src="/images/tiles/placeholder-dark.svg" alt="Tile preview placeholder (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
</Columns>
|
||
|
||
```mdx Grid layout example
|
||
<Columns cols={3}>
|
||
<Tile href="/link-one" title="Tile one" description="Short description">
|
||
<img src="/images/preview-one-light.svg" alt="Tile preview" className="block dark:hidden" />
|
||
<img src="/images/preview-one-dark.svg" alt="Tile preview (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
<Tile href="/link-two" title="Tile two" description="Short description">
|
||
<img src="/images/preview-two-light.svg" alt="Tile preview" className="block dark:hidden" />
|
||
<img src="/images/preview-two-dark.svg" alt="Tile preview (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
<Tile href="/link-three" title="Tile three" description="Short description">
|
||
<img src="/images/preview-three-light.svg" alt="Tile preview" className="block dark:hidden" />
|
||
<img src="/images/preview-three-dark.svg" alt="Tile preview (dark mode)" className="hidden dark:block" />
|
||
</Tile>
|
||
</Columns>
|
||
```
|
||
|
||
## Properties
|
||
|
||
<ResponseField name="href" type="string" required>
|
||
URL to navigate to when users click the tile.
|
||
</ResponseField>
|
||
|
||
<ResponseField name="title" type="string">
|
||
The title displayed below the tile preview. Supports inline Markdown formatting, such as `**bold**`, `_italic_`, and `` `code` ``.
|
||
</ResponseField>
|
||
|
||
<ResponseField name="description" type="string">
|
||
A short description displayed below the title.
|
||
</ResponseField>
|
||
|
||
<ResponseField name="children" type="React.ReactNode" required>
|
||
Content displayed inside the tile preview area, typically images or SVGs.
|
||
</ResponseField>
|
||
|
||
<ResponseField name="className" type="string">
|
||
Additional CSS classes to apply to the tile.
|
||
</ResponseField>
|