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

Kleurkiezer met stalen en eigen kleur New

Colour choice for a product with fixed swatches (colour name and RAL code) plus a slot for a custom colour via the system colour picker or a hex code. The preview (a window frame) recolours instantly, the price adjusts for custom mixing and the hex code is validated. The swatches are real radio buttons: arrow keys work and screen readers read the colour name. For paint, furniture, curtains and window frames.

Buitenlak voor kozijnen, 750 ml

Kleur: Grachtengroen, RAL 6009
€ 32,95

How to use it

  1. Paste the HTML where the forms & inputs 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.
<!-- Kleurkiezer met stalen en eigen kleur · NedDev · eigen werk. -->
<div class="jouw-container">
<div class="kks"><div class="kks__in">
<div class="kks__pv" aria-hidden="true"><svg viewBox="0 0 100 120"><rect class="kks__fr" x="6" y="6" width="88" height="108" rx="2"/><rect x="16" y="16" width="68" height="42" fill="#cfe0e8"/><rect x="16" y="66" width="68" height="38" fill="#cfe0e8"/><path d="M16 16l30 0-30 30z" fill="#e4eef2"/><path d="M16 66l24 0-24 22z" fill="#e4eef2"/></svg></div>
<div class="kks__ctl">
<p class="kks__prod">Buitenlak voor kozijnen, 750 ml</p>
<fieldset class="kks__fs"><legend class="kks__lg">Kleur: <span class="kks__name">Grachtengroen, RAL 6009</span></legend>
<div class="kks__sw">
<label class="kks__s" style="--c:#27352a"><input type="radio" name="kks-c" value="#27352a" data-n="Grachtengroen, RAL 6009" checked><span class="kks__vh">Grachtengroen</span></label>
<label class="kks__s" style="--c:#383e42"><input type="radio" name="kks-c" value="#383e42" data-n="Antraciet, RAL 7016"><span class="kks__vh">Antraciet</span></label>
<label class="kks__s" style="--c:#e8dfcd"><input type="radio" name="kks-c" value="#e8dfcd" data-n="Crèmewit, RAL 9001"><span class="kks__vh">Crèmewit</span></label>
<label class="kks__s" style="--c:#5c2027"><input type="radio" name="kks-c" value="#5c2027" data-n="Ossenbloed, RAL 3005"><span class="kks__vh">Ossenbloed</span></label>
<label class="kks__s" style="--c:#24364b"><input type="radio" name="kks-c" value="#24364b" data-n="Staalblauw, RAL 5011"><span class="kks__vh">Staalblauw</span></label>
<label class="kks__s kks__s--eigen"><input type="radio" name="kks-c" value="eigen" data-n="Eigen kleur"><span class="kks__vh">Eigen kleur</span><span class="kks__plus" aria-hidden="true"></span></label>
</div></fieldset>
<div class="kks__own" hidden>
<label class="kks__pick"><input class="kks__col" type="color" value="#b5651d" aria-label="Kies een eigen kleur"></label>
<label class="kks__hexl"><span class="kks__vh">Hexcode</span><input class="kks__hex" type="text" value="#b5651d" maxlength="7" spellcheck="false" aria-describedby="kks-he"></label>
<p class="kks__err" id="kks-he"></p>
</div>
<div class="kks__buy"><span class="kks__price" aria-live="polite">&euro; 32,95</span><button class="kks__btn" type="button">In winkelwagen</button></div>
</div>
</div></div>
</div>

More forms & inputs

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 →