Skip to main content
Many apps — especially study platforms — use a simple “show one div, hide the rest” navigation pattern rather than a full framework router. EpisBox works perfectly with this pattern.
This guide is based on the AuraSpace integration — a 5000+ line single HTML file app that embedded EPIS Chat in under an hour.

The pattern

Your app probably has a nav() function that shows one page and hides all others. EpisBox mounts once at page load and persists across page switches — no remounting needed.

Why height on the page div matters

The page <div> must have an explicit height. calc(100vh - 60px) is the typical pattern where 60px is your header height. If you omit height, the iframe collapses to 0px and EPIS appears invisible.
The iframe inside each container fills 100% of its parent. The chain:
Every level in the chain needs a height. Breaking any level = invisible embed. Your existing nav() function already hides/shows .page divs. You don’t need to change it — the EPIS page divs use the same class. Just add the nav items:
The EPIS iframes keep running in the background when their page div is hidden — sessions stay alive, tokens stay valid. Switching back to the EPIS page is instant.

Mobile nav

If your app has a mobile bottom nav bar:

Listening for auth in a SPA

Update your UI when users authenticate:

Lazy loading (performance optimization)

If your SPA is performance-sensitive, defer SDK loading until the user first navigates to EPIS:
The SDK is ~15KB minified and gzipped, served from Cloudflare edge. For most apps, eager loading (on DOMContentLoaded) is the right call — the extra network cost is negligible and auth can start in the background before the user navigates to EPIS.