This feature is currently in beta. Documentation for Version 1 templates is here
Preview Mode — Test every queue state locally without connecting to the live API.
See also: Template Markup & Structure | Vue State & Methods | Styling & CSS Variables
Enabling Preview Mode
Ensure "dev": true is set in the <script id="crowdhandler-data"> JSON object in your template. The application will use these values instead of making real API calls.
<script id="crowdhandler-data" type="application/ld+json">
{
"dev": true,
"status": 1,
"title": "My Event",
"position": 150,
"estimate": 12
}
</script>Status Codes
The status property determines which queue state is displayed.
| Status | State | Description |
|---|---|---|
1 | Active Queue | User is in the queue with a position |
2 | Error | An error occurred |
3 | Blocked | User has been blocked for suspicious activity |
4 | Countdown | Queue hasn't opened yet, shows countdown timer |
5 | Room Full | Queue is at maximum capacity |
Properties Reference
Core
| Property | Type | Default | Description |
|---|---|---|---|
dev | boolean | — | Required. Set to true to enable preview mode |
status | number | 1 | Queue state (see Status Codes above) |
Display
| Property | Type | Default | Description |
|---|---|---|---|
title | string | "Preview Event" | Room or event title |
message | string | "This is a preview..." | Message shown above the card |
logo | string | — | URL to a logo image |
Queue Position
| Property | Type | Default | Description |
|---|---|---|---|
position | number | 150 | Current queue position |
estimate | number | 12 | Estimated wait in minutes |
progress | number | 25 | Progress bar percentage (0–100) |
rate | number | 10 | Throughput rate (users per minute) |
Stock
| Property | Type | Default | Description |
|---|---|---|---|
stock | number | null | null | null hides the stock display. 0 shows "Sold out". |
Countdown
| Property | Type | Default | Description |
|---|---|---|---|
onsale | string | — | ISO 8601 date for when the queue opens. Required when status is 4. |
Features
| Property | Type | Default | Description |
|---|---|---|---|
emailAvailable | boolean | number | 0 | Show email notification form |
priorityAvailable | boolean | number | 0 | Show priority code form |
Captcha
| Property | Type | Default | Description |
|---|---|---|---|
captchaRequired | boolean | false | Show captcha challenge. Displays the container but won't be fully functional in preview. |
captchaType | string | "recaptcha" | "recaptcha", "hcaptcha", or "altcha" |
captchaKeyPublic | string | — | Public key for the captcha provider |
Session
| Property | Type | Default | Description |
|---|---|---|---|
token | string | "tok0123456789" | Session token (obfuscated automatically in the footer) |
sessionsExpire | number | 0 | Non-zero shows "Keep this window open" message |
sessionsTimeout | number | 10 | Shows "You will have X minutes" message |
Simulated Polling
| Property | Type | Default | Description |
|---|---|---|---|
simulatePolling | boolean | true | Automatically decrease position over time |
pollInterval | number | 5000 | Milliseconds between simulated polls |
positionDecrement | number | 5 | How much position drops per poll |
Example Configurations
Active Queue with All Features
Position, progress, stock, email form, priority code form, and simulated polling.
{
"dev": true,
"status": 1,
"title": "Summer Music Festival",
"message": "General admission tickets",
"logo": "https://example.com/festival-logo.png",
"position": 247,
"estimate": 18,
"stock": 500,
"emailAvailable": true,
"priorityAvailable": true,
"sessionsTimeout": 10,
"simulatePolling": true,
"positionDecrement": 8
}Almost There
Low position triggers "Almost there!" in the progress info.
{
"dev": true,
"status": 1,
"title": "Flash Sale",
"position": 3,
"estimate": 1,
"progress": 98
}Long Wait
Estimate above 60 minutes shows "More than an hour".
{
"dev": true,
"status": 1,
"title": "High Demand Event",
"position": 8500,
"estimate": 180,
"progress": 5
}Countdown
Set onsale to a future ISO date. The timer counts down automatically.
{
"dev": true,
"status": 4,
"title": "Exclusive Drop",
"message": "Limited edition items",
"onsale": "2026-06-01T09:00:00Z"
}Blocked
{
"dev": true,
"status": 3,
"title": "Event Name"
}Room Full
{
"dev": true,
"status": 5,
"title": "Popular Event",
"message": "Please check back later"
}Low Stock
Stock values ≤ 50 apply the low-stock styling to the badge.
{
"dev": true,
"status": 1,
"title": "Limited Run",
"position": 12,
"estimate": 2,
"progress": 90,
"stock": 3
}Sold Out
{
"dev": true,
"status": 1,
"title": "Sold Out Event",
"position": 50,
"estimate": 5,
"stock": 0
}Captcha
Shows the captcha container. The widget won't be fully interactive without a valid key.
{
"dev": true,
"status": 100,
"title": "Secure Event",
"captchaRequired": true,
"captchaType": "recaptcha",
"captchaKeyPublic": "1234567890"
}Testing Checklist
When developing a template, verify each of these scenarios:
| Scenario | What to check | Key properties |
|---|---|---|
| Active queue | Position displays, progress bar animates | status: 1, position: 150 |
| Almost there | Low position, "Almost there!" text | position: 3, estimate: 1 |
| Long wait | "More than an hour" text | estimate: 120 |
| Countdown | Timer displays and counts down | status: 4, onsale: "..." |
| Blocked | Blocked message, no position/progress | status: 3 |
| Room full | Capacity message, no position/progress | status: 5 |
| Captcha | Captcha container renders | status: 100 |
| Stock display | Badge with count | stock: 48 |
| Low stock | Low-stock styling on badge | stock: 3 |
| Sold out | "Sold out" text | stock: 0 |
| Email form | Form displays, validates, shows confirmation | emailAvailable: 1 |
| Priority code | Form displays, shows success/error | priorityAvailable: 1 |
| Session info | Timeout/expiry message shown | sessionsTimeout: 10 |
| Token display | Token obfuscated in footer, copyable | token: "tok_test_123" |
| Simulated polling | Position decrements, progress bar and poll timer animate | simulatePolling: true |
Debugging
In-Template Debug Panel
Add this anywhere in your template for a floating state inspector:
<pre style="position:fixed; bottom:0; right:0; background:#000; color:#0f0;
padding:10px; font-size:10px; max-height:300px; max-width:400px;
overflow:auto; z-index:9999; border-radius:8px 0 0 0;">
{{ JSON.stringify(ch, null, 2) }}
</pre>