Home Work
SaaS developmentAI developmentAPI developmentMobile app developmentGoogle Ads managementHeadless ShopifyLaravel developmentNext.js developmentReact developmentTypeScript engineeringUI/UX designSEO & AEOEcommerce development
AI solutionsB2B platformsE-commerceHospitalityLead generationLogisticsEducationProcess automationSaaS platformsStartup MVPReal estateHealthcare
LegalHealthcareReal estateFinanceHospitality
The HagueRotterdamAmsterdamUtrechtEindhovenAlmereBredaArnhemNijmegenTilburgEnschedeGroningenLeidenDelftZoetermeerDen Bosch
Studio
AboutProcessLabBlogContact

Vorige / volgende met richting New

Step through a case with previous/next (or arrow keys): forward slides content left, back slides it right, the counter rolls along. Uses View Transition types (:active-view-transition-type), without types a plain fade, without View Transitions an instant swap. Multi-page: @view-transition { navigation: auto; types: forward; } or set the type in the pageswap/pagereveal event based on the URL.

Case · woonboerderij Staphorst

pijltjes werken ook

How to use it

  1. Paste the HTML where the navigation & menus should appear.
  2. Add the CSS to your stylesheet. All classes are prefixed, so nothing clashes with your own styles.
  3. Add the JavaScript and call init() with the element that contains the HTML.
<!-- Vorige / volgende met richting · NedDev · eigen werk. -->
<div class="jouw-container">
<!-- Echte multi-page site (bv. /case/stap-2 naar /case/stap-3):
  1. CSS op elke pagina:  @view-transition { navigation: auto; }
  2. Zet de richting in pagereveal:  addEventListener('pagereveal', e => { if (!e.viewTransition) return; const terug = ...; e.viewTransition.types.add(terug ? 'vtr-terug' : 'vtr-vooruit'); });
     (bepaal 'terug' door het stapnummer van navigation.activation.from en .entry te vergelijken)
  3. Zelfde view-transition-name (vtr-panel, vtr-count) op beide pagina's en de :active-view-transition-type regels uit de CSS
  4. Reduced motion: @media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } } -->
<div class="vtr" tabindex="-1">
  <div class="vtr__top">
    <span class="vtr__kick">Case · woonboerderij Staphorst</span>
    <span class="vtr__count" aria-hidden="true"><b class="vtr__n">01</b> / 05</span>
  </div>
  <ol class="vtr__bar" aria-hidden="true"><li></li><li></li><li></li><li></li><li></li></ol>
  <div class="vtr__panel">
    <span class="vtr__step"></span>
    <h3 class="vtr__h"></h3>
    <p class="vtr__p"></p>
  </div>
  <div class="vtr__nav">
    <button class="vtr__btn vtr__prev" type="button"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3L5 8l5 5"/></svg>Vorige</button>
    <span class="vtr__hint">pijltjes werken ook</span>
    <button class="vtr__btn vtr__next" type="button">Volgende<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 3l5 5-5 5"/></svg></button>
  </div>
  <span class="vtr__sr" aria-live="polite"></span>
</div>
</div>

More navigation & menus

Seen something you like?

Add it to your selection and send it over. We build your site around it, in your brand.

Get in touch →