svelte-content-pages
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

svelte-content-pages

npm version

Svelte Element to do easy Content Switching. The inspiration came from

How to use

Here is how you can use

# install 
npm i svelte-content-pages

Copy this in your App.svelte file

<script>
    import {
        Page, 
        Pages
    } from "svelte-content-pages";
    var page = "";
    let fallbackSelectionView = "home";
</script>
<Pages page={page} fallbackSelection="{fallbackSelectionView}">
    <Page page="home">
        Home Page
    </Page>
    <Page page="about">
        About Page
    </Page>
</Pages>

You can use dynamic views using this library, but you may need to set a static Page section

Package Sidebar

Install

npm i svelte-content-pages

Weekly Downloads

2

Version

0.0.6

License

none

Unpacked Size

4.85 kB

Total Files

8

Last publish

Collaborators

  • arcoirislabs