{#- chirp-ui: Command Palette component Cmd+K search overlay using native . Results load via htmx into the results container. Usage: from "chirpui/command_palette.html" import command_palette, command_palette_trigger command_palette_trigger() command_palette(search_url="/search") -#} {% def command_palette(id="command-palette", search_url="/search", placeholder="Search...") %}
{% slot %}
{% end %} {% def command_palette_trigger(target="command-palette", label="Search", placeholder=none, shortcut="⌘K", icon=none, aria_label=none, density="md", cls="") %} {% set density = density | validate_variant(("sm","md"), "md") %} {% set visible_label = placeholder if placeholder is not none else label %} {% set control_label = aria_label if aria_label is not none else label %} {% end %}