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

# Card

Cards are a great way to display information, usually containing content and actions about a single subject. Cards can contain images, text and more.

**Contents:**

* Card
* Card Image

![MonalisaUI](https://raw.githubusercontent.com/tuantvk/monalisa-ui/master/assets/monalisaui-card.png)

View full example: [Card Example](https://github.com/tuantvk/monalisa-ui/blob/master/example/Card/index.js)

## Card

```javascript
import React from 'react';
import { Text } from 'react-native';
import { Card } from 'monalisa-ui';

const Example = () => (
  <Card>
    <Text>This is content card</Text>
  </Card>
);

export default Example;
```

### Configuration

| Property | Default |  Option |                  Description                  |
| -------- | :-----: | :-----: | :-------------------------------------------: |
| bordered |  false  | boolean | Include bordered prop to have border for card |
| rounded  |  false  | boolean | Renders card with slightly round shaped edges |
| style    |    -    |    -    |               Style for the card              |

### Example

```javascript
import React from 'react';
import { View, Text } from 'react-native';
import { Card } from 'monalisa-ui';

const Example = () => (
  <View>
    <Card>
      <Text>This is content card</Text>
    </Card>
    <Card bordered>
      <Text>This is content card bordered</Text>
    </Card>
    <Card bordered rounded>
      <Text>This is content card bordered and rounded</Text>
    </Card>
  </View>
);

export default Example;
```

## Card Image

Cards can contain images.

### Configuration

| Property     | Default | Option |                           Description                           |
| ------------ | :-----: | :----: | :-------------------------------------------------------------: |
| source       |    -    |    -   | The image source (either a remote URL or a local file resource) |
| height       |   150   | number |                    Set height for image card                    |
| imageStyle   |    -    |    -   |                     Style for the image card                    |
| contentStyle |    -    |    -   |                    Style for the content card                   |

### Example

```javascript
import React from 'react';
import { Text } from 'react-native';
import { CardImage } from 'monalisa-ui';

const Example = () => (
  <CardImage
    bordered
    contentStyle={{ padding: 20 }}
    height={150}
    source={{ uri: 'http://lorempixel.com/640/480/city/' }}
  >
    <Text>This is content card image</Text>
  </CardImage>
);

export default Example;
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tuantvk.gitbook.io/monalisaui/card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
