Tangly v0.2 ships richer code blocks, page chrome, and more — see what's new

Cards

Card, CardGroup, Columns — for grids, choosers, and at-a-glance landing pages.

~ 2 min read

Three components for grids and at-a-glance lists. <Card> is the unit; <CardGroup> is a card-aware grid; <Columns> is a generic grid for any children.

ComponentUse for
<Card>A single tile with title, description, optional icon, image, link
<CardGroup>Grid of cards with sensible breakpoints
<Columns>Generic responsive grid for any children

Card

PropTypeDefaultDescription
titlestringBold title at the top of the card
iconstringLucide icon name (or any supported library)
hrefstringIf set, the card becomes an anchor and gets hover styling
horizontalbooleanfalseLay out icon/image to the left of the body instead of stacked
imgstringImage URL — rendered above the body (or to the left when horizontal)
imagestringMintlify-compatible alias for img
imageAspectstring"16/9"CSS aspect ratio for the image area
colorstringCSS color used for the icon tint and --card-accent variable

Children render as the description body — you can put any MDX inside.

Default

mdx
<Card title="Quickstart" icon="rocket" href="/quickstart">
  Empty directory to live site in under a minute.
</Card>
Quickstart

Empty directory to live site in under a minute.

Without icon

mdx
<Card title="Reference" href="/reference">
  Every component, every CLI flag, every schema field.
</Card>
Reference

Every component, every CLI flag, every schema field.

Horizontal

mdx
<Card title="Themes" icon="palette" href="/guides/themes" horizontal>
  Five built-in themes. Swap with one field in `docs.json`.
</Card>
Themes

Five built-in themes. Swap with one field in docs.json.

With image

mdx
<Card title="Tang theme" img="/images/tangly-icon.png" href="/guides/themes/tang">
  Default. Mintlify-Mint inspired. Mandarin accent.
</Card>
Tang theme
Tang theme

Default. Mintlify-Mint inspired. Mandarin accent.

Custom color

mdx
<Card title="Live now" icon="zap" color="#EA580C" href="/quickstart">
  Tang accent — useful for marketing tiles.
</Card>
Live now

Tang accent — useful for marketing tiles.

CardGroup

Grid wrapper for <Card> children.

PropTypeDefaultDescription
cols1 | 2 | 3 | 42Column count at desktop. Always single-column on mobile, two columns at sm.

Two columns (default)

mdx
<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">Empty dir to live site.</Card>
  <Card title="Themes" icon="palette" href="/guides/themes">Pick or roll your own.</Card>
</CardGroup>

Three columns

mdx
<CardGroup cols={3}>
  <Card title="CLI" icon="terminal" href="/reference/cli">Every command, every flag.</Card>
  <Card title="Schema" icon="braces" href="/reference/schema">Every `docs.json` field.</Card>
  <Card title="Markdown" icon="text" href="/reference/markdown">Authoring reference.</Card>
</CardGroup>

Columns

Generic grid wrapper that accepts arbitrary children — not just cards.

PropTypeDefaultDescription
colsnumber2Column count. Clamped to 1–12.
mdx
<Columns cols={2}>
  <Frame caption="Light"><img src="/images/tangly-logo.png" /></Frame>
  <Frame caption="Dark"><img src="/images/tangly-logo-light.png" /></Frame>
</Columns>

<Columns> is the right pick when you want to lay out two screenshots, two code blocks, or any pair of things side-by-side. Reach for <CardGroup> when the children are actually cards.

Source

Last updated Edit this page
↑↓ navigate open esc close