# House points card

> Canonical HTML: https://screenrig.ai/docs/cards/house-points/

The school houses as tall bars or a ladder of bars, ranked by points, with the leader crowned and the latest awards beside them.

Category: Schools. Tags: Schools and campuses, Leaderboards and standings, Charts and gauges, Recognition.

## Previews

![House points](/cards/house-points/v1/screenshots/canvas-bloom.webp?sha=7cce1a01b16d7044494fde1dfe5c724d355677da830ddcf38495f20f13f579c7)

Canvas

![House points](/cards/house-points/v1/screenshots/corner-bloom.webp?sha=eca74aed83b906284124bf470a5012838512649451e45b7bac859259dfa419f8)

Corner

![House points](/cards/house-points/v1/screenshots/chip-bloom.webp?sha=ae5211dd7b653828d3452b3d602482901bcdc452ff65b2ffc208413264a8b5e2)

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.

An award names a house, never a student.

## 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 | `"House points"` | maxLength: `40` |  |
| `awardCount` | integer | `5` | minimum: `1`; maximum: `8` | How many recent awards the canvas lists. |
| `hour12` | boolean | `true` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `houses` | array | `[]` | minItems: `0`; maxItems: `8` | The houses and their point totals. Rank, bar heights and the leader come from the totals. |
| `houses[].name` | string |  | minLength: `1`; maxLength: `24`; Required |  |
| `houses[].points` | integer |  | minimum: `0`; maximum: `999999`; Required |  |
| `houses[].color` | string |  | pattern: `"^#[0-9A-Fa-f]{6}$"` | The house colour as #RRGGBB. Absent, the house takes a colour from the theme. |
| `awards` | array | `[]` | minItems: `0`; maxItems: `40` | Recent awards, newest first by time. An award names a house, never a student. |
| `awards[].house` | string |  | minLength: `1`; maxLength: `24`; Required | A house name from houses. |
| `awards[].points` | integer |  | minimum: `1`; maximum: `999`; Required |  |
| `awards[].reason` | string | `""` | maxLength: `80` | Why the points were given, for example Helping a new friend. |
| `awards[].at` | string | `""` | maxLength: `40` | ISO 8601 instant of the award. |

## 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": "house-points",
  "primitive": "card",
  "card": "house-points",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "house-points-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/house-points-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"houses":[],"awards":[]}}'
```
