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.

StatusStateDescription
1Active QueueUser is in the queue with a position
2ErrorAn error occurred
3BlockedUser has been blocked for suspicious activity
4CountdownQueue hasn't opened yet, shows countdown timer
5Room FullQueue is at maximum capacity

Properties Reference

Core

PropertyTypeDefaultDescription
devbooleanRequired. Set to true to enable preview mode
statusnumber1Queue state (see Status Codes above)

Display

PropertyTypeDefaultDescription
titlestring"Preview Event"Room or event title
messagestring"This is a preview..."Message shown above the card
logostringURL to a logo image

Queue Position

PropertyTypeDefaultDescription
positionnumber150Current queue position
estimatenumber12Estimated wait in minutes
progressnumber25Progress bar percentage (0–100)
ratenumber10Throughput rate (users per minute)

Stock

PropertyTypeDefaultDescription
stocknumber | nullnullnull hides the stock display. 0 shows "Sold out".

Countdown

PropertyTypeDefaultDescription
onsalestringISO 8601 date for when the queue opens. Required when status is 4.

Features

PropertyTypeDefaultDescription
emailAvailableboolean | number0Show email notification form
priorityAvailableboolean | number0Show priority code form

Captcha

PropertyTypeDefaultDescription
captchaRequiredbooleanfalseShow captcha challenge. Displays the container but won't be fully functional in preview.
captchaTypestring"recaptcha""recaptcha", "hcaptcha", or "altcha"
captchaKeyPublicstringPublic key for the captcha provider

Session

PropertyTypeDefaultDescription
tokenstring"tok0123456789"Session token (obfuscated automatically in the footer)
sessionsExpirenumber0Non-zero shows "Keep this window open" message
sessionsTimeoutnumber10Shows "You will have X minutes" message

Simulated Polling

PropertyTypeDefaultDescription
simulatePollingbooleantrueAutomatically decrease position over time
pollIntervalnumber5000Milliseconds between simulated polls
positionDecrementnumber5How 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:

ScenarioWhat to checkKey properties
Active queuePosition displays, progress bar animatesstatus: 1, position: 150
Almost thereLow position, "Almost there!" textposition: 3, estimate: 1
Long wait"More than an hour" textestimate: 120
CountdownTimer displays and counts downstatus: 4, onsale: "..."
BlockedBlocked message, no position/progressstatus: 3
Room fullCapacity message, no position/progressstatus: 5
CaptchaCaptcha container rendersstatus: 100
Stock displayBadge with countstock: 48
Low stockLow-stock styling on badgestock: 3
Sold out"Sold out" textstock: 0
Email formForm displays, validates, shows confirmationemailAvailable: 1
Priority codeForm displays, shows success/errorpriorityAvailable: 1
Session infoTimeout/expiry message shownsessionsTimeout: 10
Token displayToken obfuscated in footer, copyabletoken: "tok_test_123"
Simulated pollingPosition decrements, progress bar and poll timer animatesimulatePolling: 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>