Widgets
Have Ruley manage your AI widget and avoid timely development and maintenance costs.
Our widgets are designed to be responsive, customizable, and easy to integrate. They handle all the communication with the Ruley API, so you don't have to worry about managing state or handling API responses.
Before you begin
Create a publishable widget key and whitelist your domain in the Embed builder. This links your domain to your subscription and ensures the widget functions correctly on your site.
You can embed the chat widget with an iframe or with the Ruley loader script for inline or floating bubble modes.
<script
src="https://ruley.ai/embed/v1.js"
data-ruley-key="YOUR_WIDGET_KEY"
data-sport="kickball"
data-mode="bubble"
data-theme="light"
data-primary="#1e8e3e"
data-title="Ask the Ref"
defer
></script>Set data-mode to inline or bubble. For WordPress, paste the snippet into a Custom HTML block.
Chat widget appearance is configured via URL parameters on the iframe src, or via data-* attributes on the loader script.
k: publishable widget key (rwk_live_...)sport: sport id, e.g.kickballtheme:light,dark, orsystemprimary: hex brand color, e.g.#1e8e3eaccent: secondary hex for highlightslogoUrl: HTTPS or same-origin logo imagebackgroundUrl: HTTPS or same-origin chrome background imagesurface:defaultorbrand-darkradius:sharp,rounded, orpillfont:system,geist,montserrat, orpoppinstitle: title shown in the widget headersubtitle: secondary header line under the titlegreeting: first assistant message- Dashboard → Embed includes Brand kit presets (e.g. Turf Wars)
Set data-widget="quiz" on the loader script (or point an iframe at /embed/quiz) to embed a rules quiz instead of the chat widget. The quiz shares the same widget key, sport, theme, primary color, and title options.
<script
src="https://ruley.ai/embed/v1.js"
data-ruley-key="YOUR_WIDGET_KEY"
data-widget="quiz"
data-sport="kickball"
data-mode="inline"
data-theme="light"
data-primary="#1e8e3e"
data-title="Rules Quiz"
data-height="640"
defer
></script>Each sport ships with a built-in default question set. To use your own questions, open the Embed builder, choose the Quiz widget and a widget key, then author and save questions per sport in the Quiz Questions panel. Saved questions are stored with your account and served automatically to your embedded quiz.
Live Preview
Is that a Penalty? - Golf Rule Checker
Powered by Ruley API
