Services
Solutions
Industries
Regions
Book a call 085 369 7668 info@neddev.com

Krasbon met kortingscode New

A scratch card like at the market: scratch away the orange area with your mouse or finger and your discount code appears; past halfway the rest falls away by itself and a copy button appears. "Scratch it all open" does it in one go, for keyboard and screen reader users (the code is then announced too). For a promotion page, the thank-you page after a newsletter sign-up or a webshop mailing. Canvas 2D.

Theewinkel Het Blad, Groningen

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.
<!-- Krasbon met kortingscode · © 2026 NedDev BV · NedDev Lab-licentie (gratis gebruik, niet doorverkopen) · neddev.com/nl/lab/gebruik/#licentie -->
<div class="jouw-container">
<div class="krb">
  <div class="krb__kaart">
    <p class="krb__winkel">Theewinkel Het Blad, Groningen</p>
    <div class="krb__veld">
      <div class="krb__inhoud" aria-hidden="true"><p class="krb__code">Herfst15</p><p class="krb__uitleg">15% korting op je eerste bestelling, tot 30 november</p></div>
      <canvas class="krb__cv" aria-hidden="true"></canvas>
    </div>
    <div class="krb__acties"><button class="krb__open" type="button">Kras alles open</button><button class="krb__kopie" type="button" hidden>Kopieer code</button></div>
    <p class="krb__live" aria-live="polite"></p>
  </div>
</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 →