Skip to content

Badge Playground

Badge System

Xray Checker includes a badge system that allows you to embed proxy status indicators anywhere. Badges are perfect for:

  • Status pages
  • Dashboards
  • Documentation
  • README files
  • Monitoring displays

Interactive Builder

Use this playground to configure and preview your badge. Enter your Xray Checker URL and a proxy’s Stable ID to get started.

Preview

Dark
Light

Enter Base URL and Stable ID to see preview

Generated URL

-

Embed Code

-

URL Parameters Reference

ParameterValuesDefaultDescription
stableId{id}requiredProxy stable ID from API
themedark, lightdarkColor theme
variantdefault, flat, pill, dotdefaultBadge style
sizesm, md, lgmdBadge size
roundednone, sm, md, lg, fullmdCorner rounding
showNametrue, falsetrueShow proxy name
showLatencytrue, falsetrueShow latency value
transparenttrue, falsefalseTransparent background
widthnumber or CSS valueautoCustom width
heightnumber or CSS valueautoCustom height

Getting Stable ID

Each proxy has a unique stableId that persists across restarts. Get it from the API:

Terminal window
curl https://your-xray-checker.com/api/v1/public/proxies

Response includes stableId for each proxy:

{
"success": true,
"data": [
{
"stableId": "a1b2c3d4e5f67890",
"name": "US-Server-1",
"online": true,
"latencyMs": 150
}
]
}

Examples

Basic Badge

https://your-server.com/?stableId=abc123

Light Theme Pill

https://your-server.com/?stableId=abc123&theme=light&variant=pill

Status Dot Only

https://your-server.com/?stableId=abc123&variant=dot

Compact Without Latency

https://your-server.com/?stableId=abc123&size=sm&showLatency=false

Custom Size for Dashboard

https://your-server.com/?stableId=abc123&width=200&height=40

Transparent Background

https://your-server.com/?stableId=abc123&transparent=true

Embedding

HTML iframe

<iframe
src="https://your-server.com/?stableId=abc123&theme=light&variant=pill"
width="200"
height="50"
frameborder="0">
</iframe>

Markdown (GitHub)

Note: GitHub doesn’t support iframes. Use a status image service or link instead:

[![Server Status](https://img.shields.io/badge/dynamic/json?url=https://your-server.com/api/v1/public/proxies&query=$.data[0].online&label=US-Server&color=brightgreen)](https://your-server.com)

Page Customization

You can also customize the full dashboard page using URL parameters:

ParameterDescription
hideHeader=trueHide header with logo and controls
hideStats=trueHide statistics cards
hideServersHeader=trueHide “Servers” heading and buttons
hideControls=trueHide search, filters, and sorting
hideProxies=trueHide proxy list
hideStatusInfo=trueHide technical info footer
hideFooter=trueHide page footer
hideBackground=trueTransparent background

Example: Minimal Embed

https://your-server.com/?hideHeader=true&hideFooter=true&hideBackground=true&hideControls=true

This shows only the proxy cards on a transparent background - perfect for embedding.