Built-in cards

Add live components to a playlist: menus, clocks, queues, scores, weather and gauges. Choose a card, set its properties and publish.

A card is a built-in component on a playlist canvas. It fills its rectangle with a clock, menu, queue or other live detail, and can sit over images or video.

Layouts and anchors

Set layout and anchor in the playlist item, beside card. layout is required.

layoutBox in 1080p design unitsanchor
fullThe whole canvas, landscape or portraitnone
freeYour own rect and layernone
center900 × 420, centrednone
wideThe canvas inset 80 from the top and bottom and 30 from the sidesnone
headerThe whole top edge by 80none
footerThe whole bottom edge by 80none
corner270 × 270, flush to the cornertop-left, top-right, bottom-left, bottom-right
chip240 × 70, inset 30 from the two nearest edgestop-left, top-right, bottom-left, bottom-right
stripThe whole edge by 120top, bottom, left, right

Sizes scale by min(canvas width, canvas height) / 1080. A 4K canvas (3840 × 2160) shows the same apparent size as 1080p, and a portrait canvas the same as a landscape one. A card’s design follows the shape of its box: strip, landscape, square, portrait or tower.

anchor is required for corner, chip and strip, and not allowed for full, free, center, wide, header and footer. Omit rect and layer for every layout except free: screenRIG derives them from the page canvas when the playlist is saved. A free item needs its own rect and layer.

Compose a page with one full, center or wide card, plus corner, chip and strip cards as needed. These rules apply to each page:

  • Main card: at most one full, center or wide card.
  • Corners: at most one corner or chip card per corner.
  • Edges: at most one strip per edge, plus one card with presence that shares that edge.
  • Header and footer: a header and a footer are full-width bars, 80 high, along the top and bottom edges, and a page holds one bar per edge. A header takes the top edge’s strip slot and a footer the bottom edge’s, so that edge holds no normal strip, while a card with presence can still share it. A page can hold both a header and a footer.
  • Not limited: images, videos and web items are not limited by these rules, and any number of free cards may share a page.

A corner or chip on an edge that holds a strip moves inward past it by 120, and past a header or footer by 80 (the larger when an edge holds both), so they never overlap. A center, wide, header or footer card ignores strips.

A left or right strip is the band on that edge, 120 wide and as tall as the canvas. The card draws as a horizontal strip and the Player turns it 90 degrees about the band’s centre: the left strip counter-clockwise, so text reads bottom to top, and the right strip clockwise, so text reads top to bottom.

A card’s tier decides its layouts:

  • Core card: takes all nine, narrowed to the layouts it draws. Only the header and footer cards take those two.
  • Fullscreen card: is made for a full landscape or portrait screen and takes full only.
  • Stinger: is a page-transition bumper and takes no layout.

GET /api/card-types and screenrig cards show ID list each card’s tier and layouts.

Presence

Some cards are present only while their condition holds, such as an alerts bar on the bottom edge or a “lightning nearby” chip. While absent, a card draws nothing. While a presence strip is present, it replaces a normal strip, a header or a footer on the same edge, and the replaced card returns afterwards. A card with presence appears and leaves with motion that matches its layout:

  • Strips slide in from their edge.
  • Corners and chips rise and fade.
  • center, wide, header, footer, full and free cards fade.

Layout errors

Saving a playlist is refused with card_layout_invalid (400) for any of these:

  • a missing or unknown layout
  • a missing, unknown or unwanted anchor
  • a layout the card’s tier or views do not take
  • a rect or layer that is not the derived one

It is refused with card_layout_conflict (400) when two cards claim the same place on a page. errors[0].field names the member.

Themes

Set params.theme to neomustard (NeoMustard), cyanotype (Cyanotype), propaganda (Propaganda), signal (Signal), avant-garde (Avant Garde), bloom (Bloom), clear-dark (Clear Dark), clear-light (Clear Light), or primetime (Primetime). A card with no theme draws in NeoMustard. The cards on screenrig.ai open in Bloom and the theme control switches them. Primetime is the animated theme. A background of none gives a transparent backdrop. The corner and chip layouts use the theme’s compact plate.

Core, fullscreen and stinger cards

Each card is core, fullscreen, or stinger. Core cards fit every layout and are the ones on the Apps page. Fullscreen cards fill a landscape or portrait screen and have their own pages listed in the card reference below. The stinger plays between two pages as a page transition.

Common properties

These properties control the theme, colours and position of every card. Set them in params.

NameTypeDefaultValues and limitsDescription
themestring"neomustard""neomustard", "cyanotype", "propaganda", "signal", "avant-garde", "bloom", "clear-dark", "clear-light", "primetime"
backgroundstring"theme""theme", "none"none paints no backdrop, for layering over video.
accentstring, nullnullpattern: "^#[0-9A-Fa-f]{6}$"Overrides the theme accent.
layoutstring"full", "free", "center", "wide", "corner", "chip", "strip"Where the card is placed (CONTRACT.md "Layouts"): full is the whole screen, free any rect the host gives, center 900x420, wide is the screen inset 80 from top and bottom and 30 from the sides, corner 270x270 flush to a corner, chip 240x70 inset 30 from a corner, strip 120 high along an edge (sizes in 1080p design pixels). Without it a card takes full when its rect fills the screen, else free.
anchorstring"top-left", "top-right", "bottom-left", "bottom-right", "top", "bottom", "left", "right"Which corner (corner and chip) or edge (strip) a layout sits at. Corner defaults to top-right and strip to bottom; the other layouts take none.
backgroundColorstring, nullnullpattern: "^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"Overrides the card ground and plate with a flat CSS-ordered colour. #RRGGBBAA supplies opacity. background none takes precedence.
textColorstring, nullnullpattern: "^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"Overrides the main and secondary text colours. Accent and semantic status colours retain their roles.

Static and dynamic properties

A card is an instance in your project: a crd_ id that holds the card’s static properties and its live data document. Create it once, put its id in a page item, and change its values whenever you like.

  • Static properties are the instance’s params: theme, location, titles and the like. Change them with card params, then send the playlist again so it takes them.
  • Dynamic properties are the values marked dynamic: true in the card contract, such as menu sections, queue entries or gauge readings. They live in the card’s data document, which card data put replaces without republishing the playlist.

Players apply defaults, then static params, then the document’s dynamic properties. The live document cannot change styling, and params never carries dynamic properties. A card whose required dynamic properties have no document yet stays hidden until one is written.

One card, one document

Every card has its own data document, and every page item that holds its crd_ id shows that document. Two Workplace Posts cards that show different posts are two cards with ids of their own: a write to one updates only the items that hold its id. Put one id in several items, on one page or on many, when they should show the same document.

Per-screen values

A card’s string params may carry {screen.name}, {screen.timezone} and {screen.field.NAME}, and a location param may be exactly {screen.location}. Each screen’s manifest fills them from that screen’s own name, time zone, fields and location, so one playlist shows every screen its own values. Set a field with screenrig screen update scr_ID --field NAME=VALUE and a location with --location LAT,LON. {screen.id} is not a card token.

A page item that holds a crd_ id may add data, the key of the document the card reads. The key may carry {screen.field.NAME}, as in menu-{screen.field.store_number}, so each screen reads its own document. A data source or a card webhook writes that document with a key_template. The manifest diagnostics show screen_fact_missing for a value a screen lacks and screen_fact_invalid for a filled value the card refuses.

Feeds

Feeds are third-party data fetched and cached by the backend and passed to the card by the Player. For weather, set location with a name, latitude and longitude. The backend derives the feed key from these static properties; do not send a feed field in the canvas item. Feed documents carry source attribution and fetch timestamps. Each card reference names its feed schema and source attribution.

Show a feed’s attribution wherever its data shows: the cards do it for you. An agent reads the document a card reads with GET /api/feeds/FAMILY, where the family is the first name after Family and card in each section below. A first read of a new place answers 202 with Retry-After: 60 while screenRIG fetches it, and every card on one place shares one document.

The other families, weather, airquality, alerts, rates, crypto, earthquakes, cyclones, headlines and cap, take the flags that feeds get lists.

Tides

Tide predictions for one station, from NOAA CO-OPS: public domain data for the United States and its territories.

  • Family and card: tides and tides
  • Set: station, NOAA’s seven-character station ID, or location, which picks the nearest prediction station within 100 km. A place with no station that near derives no feed key: the card waits and the API answers 400 invalid_request.
  • Data: highs and lows from two days back to three days ahead, plus a 15-minute series for stations NOAA predicts by harmonics. Heights are metres above MLLW and times are UTC. Refreshed every 6 hours.
  • Credit: Tide predictions from NOAA CO-OPS, reformatted by screenRIG; not an official NOAA product.

Rocket launches

The next rocket launches worldwide, from The Space Devs’ Launch Library 2.

  • Family and card: launches and launch-tracker
  • Set: nothing. Every card shows the same list.
  • Data: the 20 soonest launches with provider, vehicle, pad and orbit, refreshed every 15 minutes. A launch stays listed for 24 hours after liftoff, which is how a card shows its result. The launch on the pad also gets its mission timeline of up to 20 events.
  • Credit: Data: The Space Devs / Launch Library 2.

Drug and food recalls

Recalls from a country’s health or food agency.

  • Family and card: drugalerts and drug-alerts
  • Set: country (us, ca or gb) and category (drug, the default, or food).
  • Data: the last 90 days, class I first and newest first within a class, up to 100. Refreshed every 3 to 6 hours. By country:
    • United States: FDA enforcement reports through openFDA, dated by their report date, with completed and terminated recalls left out.
    • Canada: Health Canada and CFIA recalls and safety alerts.
    • Great Britain: the MHRA’s drug recalls (classes 1 to 3) and the Food Standards Agency’s food alerts.
  • Credit: each agency’s, under its open licence: openFDA (CC0), the Open Government Licence – Canada and the Open Government Licence v3.0.

Respiratory illness

Weekly flu, COVID-19 and RSV activity.

  • Family and card: respiratory and respiratory-activity
  • Set: country (us or gb) and region: a US state, territory or DC by name or postal code, or England or a UKHSA region. An empty region is the nation.
  • Data: for each virus a level from very low to very high, a trend (rising, steady or falling, which screenRIG works out from the latest two weeks against the two before), the latest value and 26 weeks of history. By country:
    • United States: CDC’s weekly hospital admission levels and rates, refreshed every 6 hours.
    • England: UKHSA’s share of laboratory tests that are positive, refreshed every 12 hours. UKHSA publishes no level, so screenRIG sets it by comparing the latest week with the highest of the past 52: under 5% is very low, under 20% low, under 40% moderate, under 70% high, and anything above very high.
  • Credit: CDC, with no endorsement of screenRIG by CDC, HHS or the U.S. Government and the content unchanged; UKHSA, under the Open Government Licence v3.0.

Almanac

What the today card adds to the date: observances, the day’s events in history, and the sun and moon.

  • Family and card: almanac and today
  • Set: language (ar, bs, cs, de, en, es, fr, it, pt, ru, sv, tr, uk or zh; en by default), country (an ISO 3166-1 code), location ({screen.location} fills it) and date. A card with none of them shows English history and the international days.
  • Data: the country’s public holidays, its observances and the international days (holiday names are in English whatever the language); up to ten events of the day from Wikipedia’s On This Day; and, with a location, sunrise, sunset, solar noon, civil dawn and dusk, day length and the moon’s phase. Sun and moon are computed, not fetched. The document runs from the day before to two days ahead, so a page rolls over at local midnight.
  • Credit: Wikipedia contributors, under CC BY-SA 4.0.

Outdoor safety

The heat reading the outdoor-safety card shows.

  • Family and card: outdoorsafety and outdoor-safety
  • Set: location.
  • Data: an estimated wet bulb globe temperature for open ground in full sun, worked out from the weather at the location: temperature, humidity, wind, cloud and the sun’s height. Shade reads lower. It is an estimate, never a sensor reading, and the document says so. Observations are hourly, so set the card’s staleMinutes to 120 or more.
  • Lightning: the feed carries heat only. Set the card’s show to heat, or write lightning strikes to the card’s data.

Transit departures

The next departures from one to four stops of one transit provider, in leaving order.

  • Family and card: departures and departures
  • Set: provider (tfl, entur or digitransit) and stops, the provider’s stop IDs (comma-separated in the API). Find an ID with the provider’s own stop search.
  • Data: refreshed every minute while a screen shows the board. A cancelled departure stays listed as cancelled, and a stop with no departures is an empty board. If the provider does not know a stop, the whole board fails and the last board stays. TfL gives live predictions only, so its rows have no delay.
ProviderStop ID examplesCredit
tfl940GZZLUOXC (Oxford Circus), 490008660N (a bus stop)Powered by TfL Open Data
enturNSR:StopPlace:337, NSR:Quay:568Contains data under the Norwegian licence for Open Government data (NLOD) distributed by Entur
digitransitHSL:1040129© Digitransit, CC BY 4.0

Bike share

The bike share stations nearest a place, from systems that publish GBFS.

  • Family and card: bikeshare and bike-share
  • Set: location ({screen.location} works) and optionally system, a MobilityData System ID such as Mobibikes_CA_Vancouver, dublin or nextbike_bn. Without system, the nearest listed system whose area holds the place serves it. A place that no listed system covers derives no key: the card waits and the API answers invalid_request at system.
  • Data: the nearest stations first, up to 40 within 20 km, each with bikes, e-bikes, docks and status, refreshed every minute.
  • Systems: 28 whose own feed carries a licence that allows redistribution and commercial display:
    • ODbL: Mobi (Vancouver) and City Bikes Helsinki
    • CC BY 4.0: docomo (Tokyo)
    • Licence Ouverte: the JCDecaux systems (Dublin, Lyon, Toulouse, Nantes, Brussels, Luxembourg, Valencia, Ljubljana)
    • CC0: nextbike in Berlin, Cologne, Düsseldorf, Hannover, Nuremberg, Bonn, Vienna, Linz, Innsbruck, Prague, Brno, Warsaw, Wrocław, Zagreb, Barcelona, Gothenburg and Strasbourg
  • Credit: the operator, under its licence.

Publish a card canvas

Follow Quickstart to install the official plugin, select your project and pair a Player. Create the card, put its id in a playlist and publish it. This page uses the gauge card in the center layout.

Save the card’s static properties as gauge-params.json:

{"theme":"neomustard"}

Create the card with the plugin’s bundled CLI. The result carries its crd_ id.

screenrig card create --type gauge --file gauge-params.json --context "Fill-level gauge for the lobby screens; the sensor job writes its data hourly."

Or call the API with the type and its params. The 201 response carries the card’s id.

curl --request POST "https://api.screenrig.ai/api/cards" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"type":"gauge","params":{"theme":"neomustard"}}'

Save the following as playlist.json, with your card’s id in place of crd_01EXAMPLEGAUGE000000000. The page item sends only the id and its layout: the card’s params and data stay with the card.

{
  "name": "Live gauge",
  "pages": [
    {
      "id": "main",
      "canvas": {
        "width": 1920,
        "height": 1080,
        "background": "#000000FF",
        "viewport_fit": "contain"
      },
      "transition": {
        "type": "crossfade",
        "duration_ms": 500
      },
      "advance": {
        "mode": "duration",
        "after_ms": 15000
      },
      "primitives": [
        {
          "id": "gauge",
          "primitive": "card",
          "card": "crd_01EXAMPLEGAUGE000000000",
          "layout": "center",
          "content_fit": "fill"
        }
      ]
    }
  ]
}

Use API authentication for your authorization. An agent token already names its project, so the examples send no ScreenRig-Project header; if you send one, it must match the token’s project. Keep token values outside playlist files.

curl --request POST "https://api.screenrig.ai/api/playlists" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "Content-Type: application/json" \
  --data @playlist.json

The response identifies the playlist with a pl_ id. A pending_review response waits for the project’s review before going live.

To change static properties:

  1. Update the card with screenrig card params crd_ID --file gauge-params.json (PATCH /api/cards/{id} with {"params": {...}}).
  2. Send the {name, pages} document again with PUT /api/playlists/{id}. The playlist takes the card’s current params when it is saved.

A card’s major, optional when you create it, pins its contract; omitting it selects the current major.

Older page items that name a catalogue type with inline params and data, and the /api/card-data/{key} routes behind them, are still accepted. Each answer carries a deprecation warning that names its replacement: card instance ids from /api/cards, and /api/cards/{id}/data.

Write live values

Prefer the CLI, which has the command. Save the document as gauge-data.json. The file holds the document itself, with no wrapper:

{"metrics":[{"label":"Capacity","value":72,"unit":"%"}]}
screenrig card data put crd_01EXAMPLEGAUGE000000000 --file gauge-data.json

Writes replace the whole document. Each write is checked against the card’s dynamic properties: a document the card rejects is refused with card_data_invalid (409) and nothing changes. To blank the data on every screen, offline ones included, when nothing refreshes it, add --ttl 30m or --expires-at INSTANT. A notification on the card_data_stale condition tells the project when a card’s data expired because nothing renewed it.

Or call the API directly. The API wraps the same document in a document field. Documents are JSON objects of at most 1 MiB.

curl --request PUT "https://api.screenrig.ai/api/cards/crd_01EXAMPLEGAUGE000000000/data" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"document":{"metrics":[{"label":"Capacity","value":72,"unit":"%"}]}}'

Screens showing the card refetch the document and update it in place.

  • Read: GET /api/cards/{id}/data. Its revision ETag can be sent as If-Match on the next write.
  • Repeatable write: add Idempotency-Key for a safely repeatable write.
  • Expiry: add ttl_seconds or expires_at beside document.
  • List: GET /api/cards lists the project’s cards.
  • Delete: DELETE /api/cards/{id} deletes a card once no playlist uses it.

A data source or a card webhook can write the document for you: a source reads a calendar, a sheet or an address on a schedule, and a webhook turns an outside system’s HTTP post into the document.

Images in card properties use media:<mediaId>, referencing a ready image in the same project. A live data write requires those images to be approved. Never put an image URL in a card property.

Preview before you publish

screenrig card preview TYPE_OR_ID --output card.png draws a card in a local Chromium and writes the PNG, so you see it before a screen does. It takes these flags:

  • --params FILE, --data FILE and --feed FILE: the card’s params, data and feed, as JSON.
  • --layout and --anchor: the layout and anchor to draw.
  • --width and --height: 1920 by 1080 by default.
  • --now: freezes the clock at an instant.
  • --timezone: draw in this IANA time zone, such as America/Vancouver; the default is this machine's.

Set SCREENRIG_BROWSER to the browser’s path when none of the usual ones is installed.

Assign and verify with the CLI

Use the official plugin’s bundled CLI with the same project. Take the playlist id from the API response and the screen id from screen list, then assign and inspect the result:

screenrig screen list
screenrig screen assign scr_EXAMPLE --playlist-id pl_EXAMPLE
screenrig screen screenshot scr_EXAMPLE

Assignment records the desired playlist. Inspect Player evidence before reporting that it plays. CLI reference · API reference.

Card reference

The card reference covers three groups: core cards, fullscreen cards, and the stinger. Core cards fit every layout, fullscreen cards fill the whole screen, and the stinger plays between pages.

Core cards

Fullscreen cards

Stinger

For one to four huge words that take over the screen and hang there until the page ends, see Smash.