# Recipe card

> Canonical HTML: https://screenrig.ai/docs/cards/recipe/

One recipe at a glance: the dish and its photo, time and servings, the ingredients and the numbered method, with the step being cooked highlighted.

Category: Food and drink. Tags: Restaurants and cafes, Stores.

## Previews

![Recipe](/cards/recipe/v1/screenshots/canvas-bloom.webp?sha=dbc99332bd8ec3550033b1fcc3a4a1925791159d7e6347139f468af4548d977f)

Canvas

![Recipe](/cards/recipe/v1/screenshots/corner-bloom.webp?sha=7c68f1a5f0879a597d875aa7b04b0bac6d6bd694eb1788212e6a39113dfe17c6)

Corner

![Recipe](/cards/recipe/v1/screenshots/chip-bloom.webp?sha=bef56db497a1ed1b1f64d8a046e99af53e1f911c3af81dc69cd95a3983ed3e8c)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

This card uses its configured properties and live card data.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#common-properties).

Set static properties in `params`. Bind `data` to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in `params`. Nested rows describe the contents of their parent property.

### Static properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `pageSeconds` | integer | `10` | minimum: `4`; maximum: `60` | When the lists do not fit, the seconds each page stays up. |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `""` | maxLength: `120` | The dish. |
| `subtitle` | string | `""` | maxLength: `80` | A byline: the kitchen, the cook, the course. |
| `image` | string | `""` | maxLength: `200` | A project media reference for the dish's photo. |
| `prep` | integer | `0` | minimum: `0`; maximum: `1440` | Preparation minutes. |
| `cook` | integer | `0` | minimum: `0`; maximum: `1440` | Cooking minutes. |
| `serves` | integer | `0` | minimum: `0`; maximum: `1000` | How many it serves. |
| `tags` | array | `[]` | minItems: `0`; maxItems: `6` | Short marks: Vegetarian, Gluten-free, Quick. |
| `ingredients` | array | `[]` | minItems: `0`; maxItems: `60` |  |
| `ingredients[].heading` | string | `""` | maxLength: `40` | A section heading such as For the sauce; it replaces name. |
| `ingredients[].amount` | string | `""` | maxLength: `16` | The quantity: 2 tbsp, 400 g. |
| `ingredients[].name` | string | `""` | maxLength: `80` | The ingredient. |
| `ingredients[].note` | string | `""` | maxLength: `40` | Prepared how: chopped, divided. |
| `steps` | array | `[]` | minItems: `0`; maxItems: `40` |  |
| `step` | integer | `0` | minimum: `0`; maximum: `40` | The step being cooked, counting from 1. Earlier steps dim and this one is highlighted. 0 highlights none. |
| `tip` | string | `""` | maxLength: `200` | A closing tip. |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "recipe",
  "primitive": "card",
  "card": "recipe",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "recipe-main"
}
```

## Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see [API authentication](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/recipe-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"title":"","subtitle":"","image":"","prep":0,"cook":0,"serves":0,"tags":[],"ingredients":[],"steps":[],"step":0,"tip":""}}'
```
