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

Thema-wissel met cirkel New

Light, Dark or System view choice in a small till dashboard: the new theme reveals as a circle from the clicked button, scoped to its own block. View Transitions with a clip-path animation on ::view-transition-new, instant without support or with reduced motion. Across pages, store the choice in localStorage and apply it before first render; the reveal itself needs no navigation.

Omzet vandaag, di 7 okt€ 2.184,50+12% op vorige dinsdag
142 bonnenGem. € 15,38Pin 81%

How to use it

  1. Paste the HTML where the components 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.
<!-- Thema-wissel met cirkel · NedDev · eigen werk. -->
<div class="jouw-container">
<!-- Scoped: alleen .vtw__box krijgt tijdens de wissel view-transition-name: vtw-box; de rest van de pagina doet niet mee.
  Hele site: zet de naam op <html> (of laat hem weg en gebruik ::view-transition-new(root)), bewaar de keuze in localStorage
  en zet data-theme in een klein inline script in de <head>, zodat een volgende pagina direct in het juiste thema opent.
  Multi-page overgangen tussen pagina's: @view-transition { navigation: auto; }.
  Reduced motion: sla startViewTransition over (zie JS) en/of @media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } } -->
<div class="vtw">
  <div class="vtw__box" data-thema="licht">
    <div class="vtw__top">
      <span class="vtw__logo">Bakkerij Mulder · kassa</span>
      <div class="vtw__seg" role="group" aria-label="Weergave">
        <button class="vtw__opt" type="button" data-t="licht" aria-pressed="true"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="4.5"/><path d="M12 2.5v2M12 19.5v2M2.5 12h2M19.5 12h2M5.3 5.3l1.4 1.4M17.3 17.3l1.4 1.4M5.3 18.7l1.4-1.4M17.3 6.7l1.4-1.4"/></svg>Licht</button>
        <button class="vtw__opt" type="button" data-t="donker" aria-pressed="false"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"/></svg>Donker</button>
        <button class="vtw__opt" type="button" data-t="systeem" aria-pressed="false"><svg viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4.5" width="18" height="12" rx="1.5"/><path d="M9 20h6M12 16.5V20"/></svg>Systeem</button>
      </div>
    </div>
    <div class="vtw__main">
      <div class="vtw__kpi"><small>Omzet vandaag, di 7 okt</small><b>€ 2.184,50</b><span>+12% op vorige dinsdag</span></div>
      <div class="vtw__chart" aria-hidden="true"><i style="height:48%"></i><i style="height:62%"></i><i style="height:55%"></i><i style="height:71%"></i><i style="height:88%"></i><i style="height:100%"></i><i class="is-nu" style="height:66%"></i></div>
    </div>
    <div class="vtw__foot"><span>142 bonnen</span><span>Gem. € 15,38</span><span>Pin 81%</span></div>
  </div>
  <span class="vtw__sr" aria-live="polite"></span>
</div>
</div>

More components

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 →