# Bike share card

> Canonical HTML: https://screenrig.ai/docs/cards/bike-share/

Bike share stations near the screen: bikes, e-bikes and free docks at the nearest station in big counters, and the next stations by walking time.

Category: Public information. Tags: Transit and travel, Wayfinding and directories.

## Previews

![Bike share](/cards/bike-share/v1/screenshots/canvas-bloom.webp?sha=5c048f469e9746fc863b227f99da1f8b4256eff083657e27684a61056f4fe95c)

Canvas

![Bike share](/cards/bike-share/v1/screenshots/corner-bloom.webp?sha=df49f3c3a5a1d5a402e90cf2f35d13acff6669ef41d545171165dbf5302b9ac7)

Corner

![Bike share](/cards/bike-share/v1/screenshots/chip-bloom.webp?sha=e32cf168c17dfd546f6e1f10d9ca51899d82e765648caf691909d0c48047cd32)

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

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

## 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 | `"Bike share"` | maxLength: `40` |  |
| `mode` | string | `"rent"` | `"rent"`, `"return"` | rent features the nearest station with a bike; return the nearest with a free dock. |
| `count` | integer | `6` | minimum: `3`; maximum: `12` | Most stations in the list beside the nearest. |
| `maxDistanceM` | integer | `1500` | minimum: `100`; maximum: `20000` |  |
| `units` | string | `"metric"` | `"metric"`, `"imperial"` |  |
| `walkMetersPerMin` | integer | `80` | minimum: `30`; maximum: `150` |  |
| `staleMinutes` | integer | `15` | minimum: `2`; maximum: `1440` |  |
| `hour12` | boolean | `false` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `stations` | array | `[]` | minItems: `0`; maxItems: `100` | Nearby stations. A feed (screenrig.bikeshare/v1) wins when present; the data store supplies the same rows otherwise. |
| `stations[].id` | string |  | maxLength: `40` |  |
| `stations[].name` | string |  | minLength: `1`; maxLength: `80`; Required |  |
| `stations[].bikes` | integer |  | minimum: `0`; maximum: `999`; Required | Bikes available, e-bikes included. |
| `stations[].ebikes` | integer | `0` | minimum: `0`; maximum: `999` | Of those, the electric ones. |
| `stations[].docks` | integer |  | minimum: `0`; maximum: `999`; Required | Free docks. |
| `stations[].distanceM` | number |  | minimum: `0`; maximum: `100000` | Metres from the screen. |
| `stations[].walkMin` | number |  | minimum: `0`; maximum: `600` | Minutes on foot. Empty works it out from the distance. |
| `stations[].status` | string |  | maxLength: `20` | active (default), closed, offline or out-of-service. |
| `updated` | string | `""` | maxLength: `32` | When the counts were fetched, 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": "bike-share",
  "primitive": "card",
  "card": "bike-share",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "bike-share-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/bike-share-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"stations":[],"updated":""}}'
```
