Category: Food and drink. Tags: Bars and pubs, Restaurants and cafes, Prices and rates, Countdowns and timers.
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
This card uses its configured properties and live card data.
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 | "Happy hour" | maxLength: 30 | |
currency | string | "$" | maxLength: 3 | |
decimals | number, string | "auto" | "auto", 0, 1, 2 | |
hour12 | boolean | true | ||
pageSeconds | number | 10 | minimum: 5; maximum: 120 | |
footnote | string | "" | maxLength: 120 | A line along the foot, for example Dine-in only. |
timeZone | string, null | null |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
windows | array | [{"days":["weekdays"],"start":"16:00","end":"18:00"},{"days":["fri","sat"],"start":"22:00","end":"00:00","label":"Late"}] | maxItems: 8 | The weekly windows. |
windows[].days | array | maxItems: 7 | mon to sun, or weekdays, weekends, daily. | |
windows[].start | string | maxLength: 5; Required | HH:MM, 24-hour, in the screen's zone. | |
windows[].end | string | maxLength: 5; Required | HH:MM; an end before the start runs past midnight. | |
windows[].label | string | maxLength: 24 | ||
specials | array | [{"name":"House lager, pint","price":5,"was":8,"note":"Draught, 20 oz"},{"name":"Well cocktails","price":7,"was":11,"note":"Rum, vodka, gin or whisky"},{"name":"Glass of house red or white","price":6,"was":10},{"name":"Chicken wings, six","price":9,"was":14,"note":"Hot, honey garlic or dry rub","badge":"Popular"},{"name":"Loaded nachos","price":10,"was":15,"note":"Share between two"}] | maxItems: 24 | What is on special, at the happy price. |
specials[].name | string | minLength: 1; maxLength: 120; Required | ||
specials[].note | string | maxLength: 160 | ||
specials[].badge | string | maxLength: 16 | ||
specials[].price | number, null | minimum: 0 | The happy-hour price. | |
specials[].was | number, null | minimum: 0 | The regular price, struck through. | |
specials[].priceLabel | string | maxLength: 16 | Replaces the price, for example 2 for 10. |
Canvas example
Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.
{
"id": "happy-hour",
"primitive": "card",
"card": "happy-hour",
"major": 1,
"params": {
"theme": "neomustard"
},
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"layer": 0,
"content_fit": "fill",
"data": "happy-hour-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/happy-hour-main" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "ScreenRig-Project: $SCREENRIG_PROJECT" \
--header "Content-Type: application/json" \
--data '{"document":{"windows":[{"days":["weekdays"],"start":"16:00","end":"18:00"},{"days":["fri","sat"],"start":"22:00","end":"00:00","label":"Late"}],"specials":[{"name":"House lager, pint","price":5,"was":8,"note":"Draught, 20 oz"},{"name":"Well cocktails","price":7,"was":11,"note":"Rum, vodka, gin or whisky"},{"name":"Glass of house red or white","price":6,"was":10},{"name":"Chicken wings, six","price":9,"was":14,"note":"Hot, honey garlic or dry rub","badge":"Popular"},{"name":"Loaded nachos","price":10,"was":15,"note":"Share between two"}]}}'