> For the complete documentation index, see [llms.txt](https://design.mirakl.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://design.mirakl.com/design/components/structure/card.md).

# Card

Cards are a great way to add some hierarchy and organization to a panel.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FJhXNmq9hbyyzElzMAQCw%2FCard%20Hero.png?alt=media&amp;token=c99070a0-e260-478e-9247-7ab1037ebcff" alt=""><figcaption></figcaption></figure>

## Overview

Cards are a flexible component that helps organize content. They enable to display information in a clear and appealing way, making it easier to read and enhancing the overall appearance of the user interface.

<br>

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2F7F3nfOJQaW2jho03zVjw%2FCard%20-%20Background%20Grey.png?alt=media&amp;token=c5c8417a-624e-4faa-9ef3-ac9125af9898" alt="" width="375"><figcaption><p>Card with grey background</p></figcaption></figure>

## Guidelines

**Card component must always be used within a panel.** When used outside of a panel, the utilization of the Card component is strictly limited to two defined types: the Clickable Card and the Totalizer Card.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2FjqriCXH3BofcEP7ihzOi%2Fcards.svg?alt=media&amp;token=087b2b74-24f2-4753-96bc-a31f811d6030" alt=""><figcaption><p>Totalizer and clickable cards are the only cards components to be used outside of a panel</p></figcaption></figure>

The card component provides two background color options: white and grey. For visual distinction among multiple cards within the same panel, opt for a grey background.&#x20;

Beyond this, the design allows for full creative flexibility in terms of padding, elements, and media, with the only requirement being consistency.

### Cards or Datatalist ?&#x20;

[Datalist](/design/components/datalist.md) in its card variation may look a lot like cards. However, there is a slight difference between those two components.

<figure><img src="https://1297765105-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMoZPkWOmnKvoMWGW4aeM%2Fuploads%2F9JwuGYBK7UXV1JHU2oku%2FCapture%20d%E2%80%99e%CC%81cran%202024-03-07%20a%CC%80%2011.09.34.png?alt=media&amp;token=ca420106-57d1-4773-838c-6a2abd5ada69" alt=""><figcaption><p>This is a datalist in a card variation</p></figcaption></figure>

Datalists are best for displaying a collection of similar items, acting like a simpler version of a datatable without all its functionalities. They allow for easy comparison between items since the type of information displayed remains consistent across the list.&#x20;

On the other hand, Cards are more versatile and are not limited to showing repetitive information. Instead, each card can present unique content, making them suitable for a wider range of uses where diverse information needs to be displayed in an engaging way.

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://design.mirakl.com/design/components/structure/card.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
