Embed Reader
Embed a fully functional book reader on your own website. Customize colors, fonts, and behavior. Available for Developer tier.
Quick Integration
<div id="incenar-reader" data-book-id="550e8400..." data-theme="dark"></div> <script src="https://embed.incenar.com/reader.js" async></script>
GET
/v1/reader/embedDeveloperRetrieve configuration for the embed reader (themes, fonts, callbacks).
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| bookId* | uuid | — | Book to embed |
| theme | string | light | light, dark, or sepia |
| fontSize | integer | 16 | Base font size in pixels |
| fontFamily | string | system-ui | Font family name |
| showProgress | boolean | true | Display reading progress bar |
Response Example
{ "data": { "embedUrl": "...", "config": { "theme": "dark" } } }Customization Options
| Option | Type | Default | Description |
|---|---|---|---|
| data-book-id | string | — | Required. UUID of the book. |
| data-theme | string | light | light, dark, sepia |
| data-font-size | integer | 16 | Base font size (px) |
| data-font-family | string | system-ui | Any web‑safe font |
| data-show-progress | boolean | true | Show reading progress bar |
JavaScript Events
document.getElementById('incenar-reader').addEventListener('reader:chapterChange', (e) => {
console.log('New chapter:', e.detail.chapterId);
});
document.getElementById('incenar-reader').addEventListener('reader:progress', (e) => {
console.log(`${e.detail.percent}% complete`);
});