Playground
Change anything on the left. The preview, the exact prompt and the code update as you type, and every option shown here is a real option of the library. The snippets only contain options that differ from the defaults.
Prompt preview
The ask-ai:open event
Every open dispatches a bubbling ask-ai:open event from the widget root with { service, prompt, url } in detail. Click any button on this page and watch the log. Use it for analytics.
Log
- Nothing opened yet.
document.addEventListener("ask-ai:open", (e) => {
const { service, prompt, url } = e.detail;
plausible("Ask AI", { props: { service } });
});
Bring your own field
<input id="myq">
<ask-ai input="#myq" label="Ask" services="claude,chatgpt"></ask-ai>