Framework7 Svelte Package Structure

Package

Framework7 Svelte package contains the following files and folders:

framework7-svelte/
    components/
        accordion.d.ts
        accordion.svelte
        accordion-item.d.ts
        accordion-item.svelte
        ...
    framework7-svelte.js
    framework7-svelte.d.ts

Svelte Plugin

Framework7 Svelte plugin provided as ES module:

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

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

// Init plugin
Framework7.use(Framework7Svelte)

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

<App>
  <View>
    ...
  </View>
</App>
<script>
  import { App, View } from 'framework7-svelte';
</script>