Getting Started
Embed Cerebro widgets into any website with a single script tag.
Overall ID
The data-overall-idattribute is required for all widgets. It is the synchronized Event ID shared between Exposure and Cerebro that identifies which event's data to display.
Use the Overall ID input in the sidebar to set this value globally across all widget demo pages. Changing it there will update every widget preview without needing to edit each page individually.
Installation
Add the following script tag to your HTML page. The widget renders inside the script tag's parent element.
<script
data-overall-id="260104"
data-widget-type="schedule"
data-widget-theme="light"
src="https://cerebro-widget-next.vercel.app/v1/widget.js"
></script>Widget Types
Set data-widget-type to one of the following values:
| Value | Description |
|---|---|
schedule | Game schedule grouped by date with scores and team matchups. |
teams | Paginated list of teams registered for an event. |
players | Searchable, paginated player directory for an event. |
games | Game details and results. |
Global Properties
These attributes apply to all widget types. Set them as data-* attributes on the script tag, or as URL parameters when linking directly.
| Attribute | URL Param | Required | Description |
|---|---|---|---|
data-widget-type | — | Yes | The widget type to render. See table above. |
data-overall-id | overallId | Yes | The Synchronized `EventId` between Exposure and Cerebro. |
data-widget-theme | theme | No | "light" (default) or "dark". |
data-widget-page-size | pageSize | No | Number of items per page. Default: 5. |
data-widget-pagination | pagination | No | "pages" (default) or "infinite". |
data-widget-search | search | No | Pre-fill a search query (players widget). |