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

Sitezoeker (Ctrl K) New

Site search that opens with Ctrl K, Cmd K or the slash key: results grouped into pages, services and actions, arrow keys to move, Enter to open, Esc to close, recent searches and an empty state with one way out. Combobox + listbox with aria-activedescendant; opens with @starting-style (appears instantly without support). In production you fill the list from your sitemap or search index.

Druk op / of Ctrl K om te zoeken op de site.

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.
<!-- Sitezoeker (Ctrl K) · NedDev · eigen werk. -->
<div class="jouw-container">
<div class="cmk is-open">
  <div class="cmk__page" inert>
    <div class="cmk__bar">
      <span class="cmk__logo">Van Dam Installatie</span>
      <button class="cmk__trigger" type="button" aria-haspopup="dialog" aria-expanded="true" aria-controls="cmk-dlg">
        <svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6.5"/><path d="m16 16 4.5 4.5"/></svg>
        <span>Zoeken</span><kbd class="cmk__kbd cmk__mod">Ctrl</kbd><kbd class="cmk__kbd">K</kbd>
      </button>
    </div>
    <p class="cmk__hint">Druk op <kbd class="cmk__kbd">/</kbd> of <kbd class="cmk__kbd cmk__mod">Ctrl</kbd> <kbd class="cmk__kbd">K</kbd> om te zoeken op de site.</p>
    <p class="cmk__done" aria-live="polite"></p>
  </div>
  <div class="cmk__scrim"></div>
  <div class="cmk__dlg" id="cmk-dlg" role="dialog" aria-modal="true" aria-label="Zoeken op de site">
    <div class="cmk__field">
      <svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6.5"/><path d="m16 16 4.5 4.5"/></svg>
      <input class="cmk__input" type="text" role="combobox" aria-expanded="true" aria-controls="cmk-list" aria-autocomplete="list" aria-label="Zoek een pagina, dienst of actie" placeholder="Zoek een pagina, dienst of actie" autocomplete="off" spellcheck="false">
      <button class="cmk__x" type="button" aria-label="Zoeker sluiten">Esc</button>
    </div>
    <div class="cmk__list" id="cmk-list" role="listbox" aria-label="Zoekresultaten"></div>
    <div class="cmk__foot">
      <span><kbd class="cmk__kbd">↑</kbd><kbd class="cmk__kbd">↓</kbd> kiezen</span>
      <span><kbd class="cmk__kbd">Enter</kbd> openen</span>
      <button class="cmk__clear" type="button" hidden>Recent wissen</button>
    </div>
    <p class="cmk__sr" aria-live="polite"></p>
  </div>
</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 →