Embeddable Web Widget (@baziapi/widget)
Zero CodePlug-and-play BaZi Four Pillars calculator for Webflow, WordPress, Shopify, and HTML websites.
Embeddable UI Widgets
Embed an interactive calculator form anywhere on your site with 2 lines of HTML.
Installation
Bash
No npm install needed — load directly from CDN.Quick Start
HTML CDN Embed Snippet
HTML
<!-- 1. Container Element -->
<div id="bazi-widget" data-api-key="bazi_live_your_api_key_here"></div>
<!-- 2. CDN Script -->
<script src="https://cdn.baziapi.pro/v1/widget.js" async></script>API Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
data-api-key | string | Required | — | Your publishable BaZi API Key. |
data-base-url | string | Optional | https://api.baziapi.pro/api/v1 | API Base URL override. |
data-theme | 'light' | 'dark' | Optional | light | Theme mode preference. |
data-lang | 'en' | 'zh' | Optional | en | Language preference for results. |
Something unclear? Contact developer support.