Back to Home
Embeddable Widget
Add the A1C calculator to your website with just a few lines of code
Widget Configuration
Customize the widget appearance and behavior
Preview
A1C Calculator
A1C: 6.5%
48 mmol/mol
140 mg/dL
7.8 mmol/L
iFrame Embed
Simplest integration method
<!-- A1C Calculator Widget -->
<iframe
src="https://your-domain.com/widget/embed?mode=a1c_pct&value=6.5&theme=light&width=400&height=500"
width="400"
height="500"
frameborder="0"
title="A1C Calculator"
style="border: 1px solid #e5e7eb; border-radius: 8px;"
></iframe>
JavaScript Widget
More flexible integration with custom styling
<!-- A1C Calculator Widget Script -->
<div id="a1c-calculator"
data-mode="a1c_pct"
data-value="6.5"
data-theme="light">
</div>
<script src="https://your-domain.com/widget.js" async></script>
API Integration
For custom implementations
// API Example
fetch('https://your-domain.com/api/compute?mode=a1c_pct&value=6.5')
.then(response => response.json())
.then(data => {
console.log('A1C %:', data.data.a1cPct);
console.log('eAG mg/dL:', data.data.eAGmgdl);
console.log('eAG mmol/L:', data.data.eAGmmoll);
console.log('A1C mmol/mol:', data.data.a1cMmolmol);
console.log('Classification:', data.data.tier);
});
Terms of Use: The widget is free to use for educational and non-commercial purposes. Please include attribution when embedding on commercial sites. We reserve the right to limit usage if excessive API calls are detected.
Integration Features
Responsive Design
Adapts to container width
Cross-Origin Support
CORS enabled for all domains
No Dependencies
Works with any framework or vanilla JS
Privacy Focused
No tracking or data collection