School lunch card

Today's school meal with allergen marks, and the days ahead: the main dish big, the sides listed, a key for the marks.

Add a photo of today's dish and it stands beside the sides in today's panel, with the dish name still the largest thing on the screen.

Live card

This card is drawn in your browser by the same code the Players run, with sample data.

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

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, colour overrides and position, see Common properties.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring""maxLength: 40Empty reads School lunch (School breakfast, School snack).
schoolstring""maxLength: 60Shown beside the title. A feed's school name fills it when empty.
mealstring"lunch""breakfast", "lunch", "snack"
countinteger4minimum: 1; maximum: 6Days listed after the featured day.
imagestring""maxLength: 200A project media reference (media:<id>): a photo of today's dish, shown beside the sides. Empty sets the card without a photo.
showAllergensbooleantrueAllergen and diet marks and their key.
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
daysarray[]minItems: 0; maxItems: 31The menu by day. A feed (screenrig.lunch/v1) wins when present; the data store supplies the same rows otherwise.
days[].datestringmaxLength: 10; RequiredYYYY-MM-DD in the screen's zone.
days[].closedbooleanfalseNo meal this day (holiday, no school).
days[].notestringmaxLength: 80Shown on the day: Pizza day, or why there is no school.
days[].itemsarraymaxItems: 12The meal in order; the first item is the main dish.
days[].items[].namestringminLength: 1; maxLength: 60; Required
days[].items[].allergensarraymaxItems: 10milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark.
days[].items[].dietstring"vegetarian", "vegan"Shows a V or VG mark.
days[].mealsarraymaxItems: 4A feed's meals for the day; the card's meal picks one. Without meals the day's items are used.
days[].meals[].kindstring"breakfast", "lunch", "snack"; Required
days[].meals[].itemsarraymaxItems: 12; Required
days[].meals[].items[].namestringminLength: 1; maxLength: 60; Required
days[].meals[].items[].allergensarraymaxItems: 10milk, egg, fish, shellfish, tree nuts, peanuts, wheat, soy, sesame. Each shows as a two-letter mark.
days[].meals[].items[].dietstring"vegetarian", "vegan"Shows a V or VG mark.

Example params

{
  "theme": "neomustard"
}
screenrig card create --type school-lunch --major 1 --file params.json --context-file context.md

Example data

{
  "days": []
}

Layouts

This fullscreen card fills the whole screen in landscape or portrait and is not placed as a corner, chip, or strip.

Layouts: full. Forms: landscape, portrait.

Use this card

Add this card to a playlist as in Publish a card canvas, place it with the layouts and anchors and update its data as in Write live values.