Category: Food and drink. Tags: Schools and campuses, Restaurants and cafes.
Previews



Views and forms
Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.
Card views, themes and publishing. Browse the gallery.
Data and privacy
Feed: screenrig.lunch/v1.
Feed documents carry source attribution. The Player supplies the feed to the card.
Properties
For theme, background, accent and position, see 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 |
|---|---|---|---|---|
title | string | "" | maxLength: 40 | Empty reads School lunch (School breakfast, School snack). |
school | string | "" | maxLength: 60 | Shown beside the title. A feed's school name fills it when empty. |
meal | string | "lunch" | "breakfast", "lunch", "snack" | |
count | integer | 4 | minimum: 1; maximum: 6 | Days listed after the featured day. |
showAllergens | boolean | true | Allergen and diet marks and their key. | |
timeZone | string, null | null |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
days | array | [] | minItems: 0; maxItems: 31 | The menu by day. A feed (screenrig.lunch/v1) wins when present; the data store supplies the same rows otherwise. |
days[].date | string | maxLength: 10; Required | YYYY-MM-DD in the screen's zone. | |
days[].closed | boolean | false | No meal this day (holiday, no school). | |
days[].note | string | maxLength: 80 | Shown on the day: Pizza day, or why there is no school. | |
days[].items | array | maxItems: 12 | The meal in order; the first item is the main dish. | |
days[].items[].name | string | minLength: 1; maxLength: 60; Required | ||
days[].items[].allergens | array | maxItems: 10 | milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark. | |
days[].items[].diet | string | "vegetarian", "vegan" | Shows a V or VG mark. | |
days[].meals | array | maxItems: 4 | A feed's meals for the day; the card's meal picks one. Without meals the day's items are used. | |
days[].meals[].kind | string | "breakfast", "lunch", "snack"; Required | ||
days[].meals[].items | array | maxItems: 12; Required | ||
days[].meals[].items[].name | string | minLength: 1; maxLength: 60; Required | ||
days[].meals[].items[].allergens | array | maxItems: 10 | milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark. | |
days[].meals[].items[].diet | string | "vegetarian", "vegan" | Shows a V or VG mark. |
Canvas example
Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.
{
"id": "school-lunch",
"primitive": "card",
"card": "school-lunch",
"major": 1,
"params": {
"theme": "neomustard"
},
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"layer": 0,
"content_fit": "fill",
"data": "school-lunch-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.
curl --request PUT "https://api.screenrig.ai/api/card-data/school-lunch-main" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "ScreenRig-Project: $SCREENRIG_PROJECT" \
--header "Content-Type: application/json" \
--data '{"document":{"days":[]}}'