Skip to content

Commit c575646

Browse files
authored
docs: card component (#1638)
1 parent 7579a4b commit c575646

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/components/card.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Component - Card
3+
order: 3
4+
description: Explore the features and customization options of the Unfold card component
5+
---
6+
7+
# Card component
8+
9+
A card is a versatile content container used to visually separate and organize distinct sections within your layout. It helps to group related information, making your dashboard or page easier to read and navigate. Use the card component whenever you want to highlight or isolate content in a clean and structured manner.
10+
11+
```html
12+
{% load i18n unfold %}
13+
14+
{% trans "Card component title" as custom_title %}
15+
16+
{% capture as custom_action %}
17+
{% component "unfold/componentes/button.html" %}
18+
Do something
19+
{% endcomponent}
20+
{% endcapture %}
21+
22+
{% component "unfold/components/card.html" with title=custom_title action=custom_action %}
23+
Children elements here
24+
{% endcomponent %}
25+
```
26+
27+
| Parameter | Description |
28+
| --------------- | ------------------------------------------------------------------------- |
29+
| title | Card title displayed at the top |
30+
| label | Floating label displayed in the top right |
31+
| action | Content on the same row as the title, on the right |
32+
| icon | Background icon with negative spacing. Ideal for small KPI cards |
33+
| footer | Custom text displayed at the bottom of the card |
34+
| href | Link that makes the card clickable |
35+
| disable_border | Card border will not be displayed. Ideal for cards on primary backgrounds |
36+
| class | Additional CSS classes |

0 commit comments

Comments
 (0)