Render Notion blocks in Svelte

Usage no npm install needed!

<script type="module">
  import notionInSvelte from '';




An unofficial Notion API tool set for Svelte & Sapper

This package uses to generate the API. You can host this yourself, but OOTB it uses

This package is very experimental and subject to change. Check out a working page here:

How To Use

npm install @leveluptuts/svelte-notion


<script context="module">
    import { Notion, fetchNotion } from "@leveluptuts/svelte-notion";

    const fetchImage = (async () => {
        const pageId = `3e03212e646e41caaa560408162dee99`
        return await fetchNotion({ id: pageId, context: this })

{#await fetchImage}
{:then blocks}
    <Notion {blocks} />
{:catch error}
    <p>An error occurred!</p>


<script context="module">
  import { Notion, fetchNotion } from "@leveluptuts/svelte-notion";

  export async function preload() {
    const pageId = `3e03212e646e41caaa560408162dee99`;
    const blocks = await fetchNotion({ id: pageId, context: this });
    return { blocks };

  export let blocks;

<Notion {blocks} />

What's supported currently

(shout-out to splitbee for this dope table. I borrowed from his React Notion repo)

We happily accept pull requests to add support for the missing blocks. I'll be adding as many as I can asap.

Block Type Supported Notes
Text ✅ Yes
Heading ✅ Yes
Image ❌ Missing
Image Caption ❌ Missing
Bulleted List ❌ Missing
Numbered List ❌ Missing
Quote ✅ Yes
Callout ❌ Missing
Column ❌ Missing
iframe ❌ Missing
Video ❌ Missing Only embedded videos
Divider ✅ Yes
Link ✅ Yes
Code ✅ Yes
Web Bookmark ❌ Missing
Databases ❌ Missing
Checkbox ❌ Missing
Toggle List ❌ Missing
Table Of Contents ❌ Missing

How To Host Your Own API

Coming Soon


Is this practical?

Maybe? I could be much more very soon.

I thought Notion didn't have an API?

It don't. Don't hold your breath on this working forever. See the Splitbee package for more info. The intention would be to migrate this to the official API once it's released.


Heavily inspired by