Framework7 Svelte Package Structure

Package

Framework7 Svelte package contains the following files and folders:

framework7-svelte/
    components/
        accordion-content.svelte
        accordion-item.svelte
        accordion-toggle.svelte
        accordion.svelte
        actions-button.svelte
        actions-group.svelte
        actions-label.svelte
        actions.svelte
        app.svelte
        ...
    framework7-svelte.esm.js

Components

All Svelte components are located in components/ folder.

import App from 'framework7-svelte/components/app.svelte';
import Navbar from 'framework7-svelte/components/navbar.svelte';

Or they can be imported using named import from main file

import { App, Navbar } from 'framework7-svelte';

ES Module

Framework7 Svelte plugin can be imported as an ES-next module:

// Import Framework7 Core
import Framework7 from 'framework7/framework7-lite.js';
/*
Or import bundle with all components:
import Framework7 from 'framework7/framework7-lite.esm.bundle.js';
*/

// Import Framework7 Svelte
import Framework7Svelte from 'framework7-svelte';

// Init plugin
Framework7.use(Framework7Svelte)

By default it exports only Framework7 Svelte plugin without any components. To import components separately, we need to use named import:

import { App, Navbar } from 'framework7-svelte';

ES-Next

Note, that Framework7 and Framework7 Svelte ES modules are in ES-next syntax, so don't forget to enable/configure your Babel/Buble to transpile them as well, as well as template7, dom7 and ssr-window modules that used as dependencies.