Skip to content
← Global Search
Edit Global Search
Name
Also known as (comma separated)
Brief definition
Searches across the application.
Notes
Tier
Core
Useful
Reference
Deleted
Controls schema (JSON array)
[ { "id": "label", "type": "text", "label": "Label", "default": "Search everything" }, { "id": "placeholder", "type": "text", "label": "Placeholder", "default": "Search projects, files, people…" }, { "id": "shortcutHint", "type": "toggle", "label": "Show shortcut hint", "default": true }, { "id": "accent", "type": "color", "label": "Accent colour", "default": "#D9C8F0", "presets": [ "#D9C8F0", "#A8E6C1", "#F5C2E0", "#BFD9F2", "#E8A020", "#241430" ] }, { "id": "radius", "type": "number", "label": "Corner radius", "default": 10, "min": 0, "max": 24, "step": 1 } ]
Templates (JSON object keyed by format)
{ "html": "<form class=\"gsearch\" role=\"search\" style=\"--accent:{{accent}};\">\n <label class=\"gsearch__label\" for=\"gsearch-input\">{{label}}</label>\n <div class=\"gsearch__box\" style=\"border-radius:{{radius}}px;\">\n <svg class=\"gsearch__icon\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"currentColor\" stroke-width=\"2\"/><path d=\"M20 20l-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"/></svg>\n <input id=\"gsearch-input\" class=\"gsearch__input\" type=\"search\" placeholder=\"{{placeholder}}\">\n {{#if shortcutHint}}<span class=\"gsearch__hint\">⌘K</span>{{/if}}\n </div>\n</form>\n<style>\n.gsearch { display: block; font: 14px system-ui, sans-serif; color: #241430; max-width: 420px; }\n.gsearch__label { display: block; margin-bottom: 6px; font-weight: 500; }\n.gsearch__box { display: flex; align-items: center; gap: 8px; box-sizing: border-box; padding: 10px 12px; background: #FAF7F2; border: 1.5px solid #24143026; }\n.gsearch__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }\n.gsearch__icon { flex: none; color: #24143080; }\n.gsearch__input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; color: #241430; outline: none; }\n.gsearch__input::-webkit-search-cancel-button { display: none; }\n.gsearch__hint { flex: none; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: #24143012; color: #24143099; }\n</style>", "tailwind": "<form role=\"search\" class=\"block font-sans text-sm text-[#241430] max-w-[420px]\">\n <label for=\"gsearch-input-tw\" class=\"block mb-1.5 font-medium\">{{label}}</label>\n <div class=\"flex items-center gap-2 box-border px-3 py-2.5 bg-[#FAF7F2] border-[1.5px] border-[#24143026] focus-within:shadow-[0_0_0_3px_var(--tw-accent-ring)]\" style=\"border-radius:{{radius}}px;--tw-accent-ring:color-mix(in srgb, {{accent}} 35%, transparent);\">\n <svg class=\"flex-none text-[#24143080]\" width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\"><circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"currentColor\" stroke-width=\"2\"></circle><path d=\"M20 20l-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\"></path></svg>\n <input id=\"gsearch-input-tw\" type=\"search\" placeholder=\"{{placeholder}}\" class=\"flex-1 min-w-0 border-none bg-transparent outline-none [&::-webkit-search-cancel-button]:hidden\">\n {{#if shortcutHint}}<span class=\"flex-none text-[11px] font-semibold px-1.5 py-0.5 rounded-[5px] bg-[#24143012] text-[#24143099]\">⌘K</span>{{/if}}\n </div>\n</form>", "react": "export function GlobalSearch({\n label = \"{{label}}\",\n placeholder = \"{{placeholder}}\",\n shortcutHint = {{shortcutHint}},\n accent = \"{{accent}}\",\n radius = {{radius}},\n}) {\n return (\n <form role=\"search\" style={{ display: \"block\", fontFamily: \"system-ui, sans-serif\", fontSize: 14, color: \"#241430\", maxWidth: 420 }}>\n <label htmlFor=\"gsearch-input\" style={{ display: \"block\", marginBottom: 6, fontWeight: 500 }}>{label}</label>\n <div style={{\n display: \"flex\", alignItems: \"center\", gap: 8, boxSizing: \"border-box\", padding: \"10px 12px\",\n background: \"#FAF7F2\", border: \"1.5px solid #24143026\", borderRadius: radius,\n }}>\n <svg width=\"18\" height=\"18\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\" style={{ flex: \"none\", color: \"#24143080\" }}>\n <circle cx=\"11\" cy=\"11\" r=\"7\" stroke=\"currentColor\" strokeWidth=\"2\" />\n <path d=\"M20 20l-3.5-3.5\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" />\n </svg>\n <input id=\"gsearch-input\" type=\"search\" placeholder={placeholder} style={{ flex: 1, minWidth: 0, border: \"none\", background: \"transparent\", font: \"inherit\", color: \"#241430\", outline: \"none\" }} />\n {shortcutHint && (\n <span style={{ flex: \"none\", fontSize: 11, fontWeight: 600, padding: \"2px 6px\", borderRadius: 5, background: \"#24143012\", color: \"#24143099\" }}>⌘K</span>\n )}\n </div>\n </form>\n );\n}" }
Save
History