# UV index card

> Canonical HTML: https://screenrig.ai/docs/cards/uv-index/

The UV index now on a WHO-colour dial, today's curve with its peak and the window to seek shade, minutes to burn by skin type and SPF advice. A clear-sky estimate from the sun's height when there is no feed.

Category: Weather. Tags: Weather and environment, Healthcare, Schools and campuses.

## Previews

![UV index](/cards/uv-index/v1/screenshots/canvas-bloom.webp?sha=6e5458af9d2711d45dcb4c29d58cb4d255299943632fb117b47d4b4cf8758ae8)

Canvas

![UV index](/cards/uv-index/v1/screenshots/corner-bloom.webp?sha=9338b59052925817c6a1fb3dd76ceb5a7604f936ed263935b599deed790532c7)

Corner

![UV index](/cards/uv-index/v1/screenshots/chip-bloom.webp?sha=e90eddd782006e2c13df73d4072b415c8e8462fe61b45c10a7a56e1fb2edc53e)

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.weather/v1`.

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

Weather attribution: Weatherbit, or Data from MET Norway (NLOD 2.0 and CC BY 4.0), as named in the feed document.

## 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 | `"UV index"` | maxLength: `30` | The header when the location has no name. |
| `location` | object, null | `null` | additionalProperties: `false` | Where the UV is for. With no feed the card computes a clear-sky estimate for this place. |
| `location.name` | string |  | maxLength: `40`; Required |  |
| `location.latitude` | number |  | minimum: `-90`; maximum: `90`; Required |  |
| `location.longitude` | number |  | minimum: `-180`; maximum: `180`; Required |  |
| `hour12` | boolean | `false` |  |  |
| `timeZone` | string, null | `null` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `uvIndex` | number, null | `null` | minimum: `0`; maximum: `20` | A UV reading set by staff. It scales the day's curve and wins over the estimate; the weather feed wins over it. |

## 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": "uv-index",
  "primitive": "card",
  "card": "uv-index",
  "major": 1,
  "params": {
    "theme": "neomustard",
    "location": {
      "name": "Vancouver",
      "latitude": 49.25,
      "longitude": -123.0
    }
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "uv-index-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/uv-index-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"uvIndex":null}}'
```
