# Trivia card

> Canonical HTML: https://screenrig.ai/docs/cards/trivia/

A trivia round that runs itself: a question with its choices and a countdown, then the answer, then a fun fact, one question after another. The cycle is computed from the wall clock, so every screen shows the same question at the same second. Seconds per phase and the order (as listed or a shared shuffle) are params; questions are dynamic content.

Category: Media. Tags: Social and audience, Events and venues, Schools and campuses, Restaurants and cafes, Bars and pubs.

## Previews

![Trivia](/cards/trivia/v1/screenshots/canvas-bloom.webp?sha=3ea7af2256025257ace798bc3c341c78ad96b1d6179d94e181085b946d2bc878)

Canvas

![Trivia](/cards/trivia/v1/screenshots/corner-bloom.webp?sha=a01c39994fc0d7c57c74ae473f5b71f96f59e8f9d9d05a4ab4505c338a252c76)

Corner

![Trivia](/cards/trivia/v1/screenshots/chip-bloom.webp?sha=8555768b562f28a446b8e9da3bb0bad6c3cf92d06a604f7f1f2ac04fb3d95891)

Chip

## Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## Data and privacy

This card uses its configured properties and live card data.

## Properties

For theme, background, accent and position, see [Common properties](/docs/cards/#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 | `"Trivia"` | maxLength: `40` | The label above the question. |
| `askSeconds` | integer | `15` | minimum: `5`; maximum: `120` | How long the question and its countdown show. |
| `revealSeconds` | integer | `6` | minimum: `3`; maximum: `60` | How long the answer shows. |
| `factSeconds` | integer | `6` | minimum: `3`; maximum: `60` | How long the fact shows, for questions that have one. |
| `order` | string | `"in-order"` | `"in-order"`, `"shuffle"` | in-order follows the list; shuffle draws a new order every round, the same on every screen. |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `questions` | array | `[]` | maxItems: `40` | The questions. `choices` (two to six) are optional; `answer` is the correct choice's text or its position (0 is the first) and, with no choices, the answer itself. `fact` is shown after the answer. |
| `questions[].question` | string |  | maxLength: `200`; Required |  |
| `questions[].choices` | array |  | maxItems: `6` |  |
| `questions[].answer` | string, integer |  | maxLength: `120`; Required |  |
| `questions[].fact` | string |  | maxLength: `240` |  |

## Canvas example

Add this item to a playlist page’s `primitives`. [Publish the playlist and assign a screen](/docs/cards/#publish-a-card-canvas).

```json
{
  "id": "trivia",
  "primitive": "card",
  "card": "trivia",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "trivia-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](/docs/authentication/).

```console
curl --request PUT "https://api.screenrig.ai/api/card-data/trivia-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"questions":[]}}'
```
