@astlide/core API Reference
    Preparing search index...

    Module embed

    <astlide-deck> — show a built Astlide deck inside any page.

    A framework-agnostic custom element: it loads the deck in an iframe at 16:9 (sized by its container's width) and drives it over a small postMessage protocol. Works in plain HTML, Markdown/MDX pages, and any framework; see @astlide/core/embed/react and @astlide/core/embed/vue for thin wrappers and @astlide/core/components/DeckEmbed.astro for Astro sites.

    <script type="module">import "@astlide/core/embed";</script>
    <astlide-deck src="/my-talk/" start="2" controls></astlide-deck>

    Importing the module registers the element (in browsers only — it is safe to import during SSR).

    Messages are plain objects. The host page sends { source: "astlide-embed", type: "hello" | "next" | "prev" | "goto", slide? } to the iframe, targeted at the deck's origin. The deck page only listens when it is framed, only to its parent window, and answers to the origin that sent hello with { source: "astlide-deck", type: "slidechange", deck, slide, total, step, steps }. The element in turn only accepts messages from its own iframe and the deck's origin.

    defineAstlideDeck
    parseDeckMessage
    slideSrc
    SlideChangeDetail
    EmbedCommand
    DECK_SOURCE
    EMBED_SOURCE
    AstlideDeckElement