Category: Schools. Tags: Schools and campuses, Leaderboards and standings, Recognition.
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.
A class is a name, never a student.
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 |
|---|---|---|---|---|
format | string | "number" | "number", "percent", "money" | How values show: a number with its unit, a percentage or an amount of money. |
unit | string | "" | maxLength: 12 | The unit after a number, for example min or books. |
currency | string | "$" | maxLength: 3 | The symbol before an amount of money. |
scaleFrom | number | 0 | minimum: 0; maximum: 99999999 | Where the bars start, so close values (attendance of 94 to 98 percent) still show a difference. |
showTotal | boolean | true | Show the total of all classes (the average for percentages) and the countdown. | |
timeZone | string, null | null |
Dynamic properties
| Name | Type | Default | Values and limits | Description |
|---|---|---|---|---|
title | string | "Class challenge" | maxLength: 40 | The heading, for example Reading challenge. |
classes | array | [] | minItems: 0; maxItems: 10 | The classes and their values. Rank, bar lengths and the leader come from the values. A class is a name, never a student. |
classes[].name | string | minLength: 1; maxLength: 48; Required | ||
classes[].value | number | minimum: 0; maximum: 99999999; Required | ||
classes[].color | string | pattern: "^#[0-9A-Fa-f]{6}$" | The class colour as #RRGGBB. Absent, the class takes a colour from the theme. | |
goal | number | 0 | minimum: 0; maximum: 99999999 | The target. 0 sets none. |
goalFor | string | "each" | "each", "total" | each: every class races to the goal. total: the classes reach it together. |
endsAt | string | "" | maxLength: 40 | ISO 8601 instant the challenge ends (a time without an offset is wall time in the screen's zone). Empty shows no countdown. |
Canvas example
Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.
{
"id": "class-challenge",
"primitive": "card",
"card": "class-challenge",
"major": 1,
"params": {
"theme": "neomustard"
},
"rect": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"layer": 0,
"content_fit": "fill",
"data": "class-challenge-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/class-challenge-main" \
--header "Authorization: Bearer $SCREENRIG_TOKEN" \
--header "ScreenRig-Project: $SCREENRIG_PROJECT" \
--header "Content-Type: application/json" \
--data '{"document":{"title":"Class challenge","classes":[],"goal":0,"goalFor":"each","endsAt":""}}'