# Study rooms card

> Canonical HTML: https://screenrig.ai/docs/cards/study-rooms/

Which library and group study rooms are free now, for how long, and when each booked room frees up.

Category: Schools. Tags: Schools and campuses, Wayfinding and directories, Queues and waits.

## Previews

![Study rooms](/cards/study-rooms/v1/screenshots/canvas-bloom.webp?sha=05b09d59052d23e12a1d8c9a199ca899da8d7ad15f79d5f96a73aeb206df9889)

Canvas

![Study rooms](/cards/study-rooms/v1/screenshots/corner-bloom.webp?sha=1fbaed55bd247bc0e5348a24a908f479c467a8854094a19bdf5af932b1d543c0)

Corner

![Study rooms](/cards/study-rooms/v1/screenshots/chip-bloom.webp?sha=3642be31248defbdbfdd0b0fd4fd7dfab42095d9c9475c755e1d30fa045359eb)

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

Feed: `screenrig.rooms/v1`.

Feed documents carry source attribution. The Player supplies the feed to the card.

Times only: booking titles and names never show.

## 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 | `"Study rooms"` | maxLength: `40` |  |
| `minFreeMinutes` | integer | `20` | minimum: `0`; maximum: `240` | A room free for less than this reads as booked soon, not free. |
| `opensAt` | string | `""` | maxLength: `5` | When the library opens, HH:MM in the screen's zone. Empty: always open. |
| `closesAt` | string | `""` | maxLength: `5` | When the library closes, HH:MM. Rooms read free until then; empty: until the day's end. |
| `sort` | string | `"free"` | `"free"`, `"feed"` | free puts the room free the longest first; feed keeps the order given. |
| `showSeats` | boolean | `true` |  |  |
| `staleMinutes` | integer | `10` | minimum: `1`; maximum: `1440` |  |
| `hour12` | boolean | `false` |  |  |
| `timeZone` | string, null | `null` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `rooms` | array | `[]` | maxItems: `60` | The rooms. A feed (screenrig.rooms/v1) wins when present; the data store supplies the same rows otherwise. |
| `rooms[].name` | string |  | minLength: `1`; maxLength: `40`; Required |  |
| `rooms[].floor` | string |  | maxLength: `24` | Level 2. |
| `rooms[].capacity` | integer |  | minimum: `1`; maximum: `500` | Seats. |
| `rooms[].events` | array |  | maxItems: `60` | The room's bookings. Titles and names never show. |
| `rooms[].events[].start` | string |  | maxLength: `32`; Required | ISO 8601; with an offset or wall time in the screen's zone. |
| `rooms[].events[].end` | string |  | maxLength: `32` | Without it a booking lasts an hour. |
| `updated` | string | `""` | maxLength: `32` | When the bookings were read, ISO 8601 (data store only; a feed carries fetchedAt). |

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