---
title: "Card"
description: "A card is a container element used to group together and separate blocks of content."
url: https://developers.dhis2.org/docs/ui/components/card
source: https://github.com/dhis2/developer-portal/edit/main/docs/ui/components/card.md
---

# Card

A card is a container element used to group together and separate blocks of content.

[Interactive demo: card--default](https://developers.dhis2.org/demo/?path=/story/card--default)

## Usage

```jsx
<Card>Card Content.</Card>
```

### When to use

- **Group content**. Use a card as a container for related content. When there's different areas of content on a page, a card helps to establish boundaries between them.

### When not to use

- **Few items**. A card probably isn't necessary to contain one or two items. Everything on a page doesn't need to be wrapped in a card.

## API Reference

### Card

#### Usage

To use `Card`, you can import the component from the `@dhis2/ui` library  

```js
import { Card } from '@dhis2/ui'
```

#### Props

|Name|Type|Default|Required|Description|
|---|---|---|---|---|
|children|node||||
|className|string||||
|dataTest|string|``'dhis2-uicore-card'``|||
