# Card

Below is an example configuration of a panel using the **Card** module:

```python
{
    "title": "Supplier Information",
    "full_row": True,
    "url_name": "frame_board",
    "url_action_name": "panel_supplierparent_card",
    "width": 6,
    "reload_div": True,
    "content": {
        "view": module_views.Board,
        "url_params_list": [{"pk": "int"}],
        "view_params": {
            "model": custom_models.SupplierParent,
            "limit": 1,
            "cards_per_row": 1,
            "url_name": "panel_supplierparent_card",
            "board_wrapper": False,
            "field_definitions": {
                "footer_settings": {
                    "footer": True,
                    "allowed_user_groups": [
                        "Superuser",
                    ],
                },
                "bg_class_mapping": {
                    "success": {"is_active": True},
                    "danger": {"is_active": False},
                },
                "heading_fields": {
                    "title_field_name": "name",
                },
                "group_items": [
                    {
                        "label": "Active",
                        "field_name": "is_active",
                        "format": "input",
                        "input_type": "dropdown",
                        "select_options": [
                            {"label": "Yes", "value": True},
                            {"label": "No", "value": False},
                        ],
                        "mapping": {
                            True: "Yes",
                            False: "No",
                        },
                        "allowed_user_groups": [
                            "Superuser",
                        ],
                    },
                ],
            },
        },
    },
},
```

The **view\_params** are:

* **model**: The model shown in the card
* **url\_name**: Unique reference for the panel
* field\_definition:
  * **footer\_setting**: Basic setting for the footer such as privilege
  * **bg\_class\_setting**: The setting of the background
    * **success**: The background is green when the field is **True**
    * **danger:** The background is red when the field is **False**
  * **heading\_field**: The heading of the card&#x20;
  * **group\_items**:&#x20;
    * **label:** The heading of the field in the card
    * fi**eld\_name:** The field in the model
    * **format:** The format of the input box
    * **input:** The input type
    * **select\_options:** The option of the input
    * **mapping:** The mapping of the options
    * **allowed\_user\_group:** The user group who can see the content

<figure><img src="https://3317070279-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F21lWxRGfp98mDu2HVXvf%2Fuploads%2FfNCAR1sNIOVOKhmUPDew%2Fimage.png?alt=media&#x26;token=d0790c12-4a97-469c-8022-8fe29fd954e1" alt=""><figcaption></figcaption></figure>
