Command Palette Search
A command palette with fuzzy-matched actions, via Fuse.js.
Requires Bootstrap 5, Fuse.js. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><script src="https://cdn.jsdelivr.net/npm/fuse.js@7.0.0/dist/fuse.min.js"></script><div class="card border-0 shadow" style="max-width:340px"><div class="card-body"><input class="form-control mb-2" id="cpQ" placeholder="Type a command…"><ul class="list-group list-group-flush small" id="cpL"></ul></div></div>var cmds=["Open settings","Create project","Invite user","View billing","Toggle dark mode","Log out"];var fuse=new Fuse(cmds,{threshold:.4}),q=document.getElementById("cpQ"),l=document.getElementById("cpL");function r(items){l.innerHTML=items.map(function(x){return "<li class=\"list-group-item px-0 py-1\">"+(x.item||x)+"</li>"}).join("")}q.addEventListener("input",function(){r(q.value?fuse.search(q.value):cmds.map(function(c){return {item:c}}))});r(cmds.map(function(c){return {item:c}}));Free to use.This component uses Bootstrap 5, Fuse.js (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.