Snapdeckv1
Docs / quickstart

Quickstart.

Pick your stack. Ship in one file.

Markup

Every deck needs sections with the data-snapdeck-section attribute.

<div id="deck">
  <section data-snapdeck-section>Home</section>
  <section data-snapdeck-section>About</section>
  <section data-snapdeck-section>Contact</section>
</div>

Install & mount

installbash
npm install @snapdeck/core
main.tsts
import snapdeck from '@snapdeck/core';
import '@snapdeck/core/css';

const api = snapdeck('#deck', {
  anchors: ['home', 'about', 'contact'],
  scrollingSpeed: 650,
});

api.on('afterLoad', ({ to }) => {
  console.log('now at', to.index);
});

Next