Skip to content

Recommended widget

The recommended widget is a small, standalone embed — designed for a home page or lobby strip — that surfaces a handful of recommended / most-popular boxes. It does not play boxes itself. When a player engages a card, the widget emits an event and your page navigates to the box’s page (where the full iframe lives). Navigation happens in the parent, not inside the widget.

<iframe
src="https://{operator}.app.lootboxsolutions.com/play/widget?parent=https://casino.example&variant=popular&limit=8"
style="width:100%;height:220px;border:0">
</iframe>
ParamPurpose
variantpopular (default) or another curated set.
limitHow many boxes to show.
locale / currencyDisplay language and prices.
parentYour origin, to enable messaging.

Prefer to render it yourself? Build the same strip from GET /boxes?sort=-meta.popularity in your own design system — the widget is just a convenience wrapper over that data.

Card actions → parent navigation

Each card has two actions; both leave the widget and continue on the box page. The widget emits an event; your page performs the navigation (a real redirect/route to the box page that hosts the main iframe).

Card actionEvent emittedWhat your page does
Tap the cardbox:card-clicked { boxId }Navigate to the box page. The player configures and opens there.
Buy nowbox:card-purchase { boxId }Navigate to the box page and launch with autoOpen so the box is purchased and auto-played the moment the page loads.

With the SDK (raw box:card-* messages surface as camelCase events):

games.on('boxCardClicked', ({ boxId }) => location.assign(`/games/box/${boxId}`));
games.on('boxCardPurchase', ({ boxId }) => location.assign(`/games/box/${boxId}?autoplay=1`));

On the box page, your backend mints a launch at that boxId — adding autoOpen: true for the “Buy now” path — and embeds the full iframe. The player lands already mid-spin.

widget ──box:card-purchase {boxId}──▶ your page redirects to /games/box/{id}
──(your backend mints launch boxId+autoOpen)──▶ full iframe opens & auto-plays

Guests

On a logged-out home page, the widget runs in guest mode: it displays boxes and prices, and a card action emits play:auth-required instead, so your page can prompt sign-in and then continue to the box page.

Why parent navigation rather than navigating inside the widget? The widget is a small strip — “open” means go to the box, not browse within a list. Routing in the parent also lets the box page own a real URL (good for refresh, sharing, and analytics). See refresh & deep-linking.