- Documentation
- Components
- Cards and columns
Cards and columns
Link to other pages with Card, lay cards out with CardGroup or Columns, and show a preview with Tile.
A card is a box with an icon, a title and some text. Put it in a CardGroup to set the cards side by side.
<CardGroup cols={2}> <Card title="Quickstart" icon="bolt" href="/get-started/quickstart" cta="Start"> Publish your first site. </Card> <Card title="Write pages" icon="file-text" href="/write/pages" horizontal> The icon sits beside the text. </Card></CardGroup>bolt is a Font Awesome name, shown as Lucide’s zap. See icons.
A tile shows a preview, such as an image or an icon, above a title and a short description.
<CardGroup cols={2}> <Tile title="Pages" description="MDX files in your repo" href="/write/pages"> <Icon icon="file-text" size={40} /> </Tile></CardGroup>Card props
Section titled “Card props”titlestring- The card’s title.
iconstring- A Lucide or Font Awesome name, or an image path.
colorstring- The icon’s color, as hex, a color name, or
rgb()orhsl().
hrefstring- Makes the whole card a link.
imgstring- An image across the top of the card.
horizontalboolean- Puts the icon beside the text.
ctastringThe call to action shown with an arrow after it. It shows only when the card has an
href.
arrowboolean- With
href, shows the arrow even without acta.
CardGroup and Columns props
Section titled “CardGroup and Columns props”Columns is the same component as CardGroup.
colsnumberColumns across, from 1 to 4. Phones always show one.
Tile props
Section titled “Tile props”titlestring- The title under the preview.
descriptionstring- A line of text under the title.
hrefstring- Makes the whole tile a link.