PyBlade/ui
Menu⌄
DocsComponentsCommand

Command

A searchable list of commands, with keyboard navigation.

Alpine.js8 files

Installation

pyblade-ui add command

Usage

The tags <pb-ui.command> <pb-ui.command-input> <pb-ui.command-list> <pb-ui.command-empty> <pb-ui.command-group> <pb-ui.command-item> <pb-ui.command-separator> <pb-ui.command-shortcut> are available in all your templates.

<pb-ui.command class="rounded-lg border shadow-md">
  <pb-ui.command-input placeholder="Type a command or search..." />
  <pb-ui.command-list>
    <pb-ui.command-empty>No results found.</pb-ui.command-empty>
    <pb-ui.command-group heading="Suggestions">
      <pb-ui.command-item href="/calendar">Calendar</pb-ui.command-item>
      <pb-ui.command-item>Search emoji</pb-ui.command-item>
    </pb-ui.command-group>
  </pb-ui.command-list>
</pb-ui.command>

Examples

Combobox (with Popover)

Props

<pb-ui.command-group>
PropDefault
heading''
<pb-ui.command-item>
PropDefault
hrefNone

Any other attribute (class, id, x-on:click, hx-post…) is passed to the root element; your Tailwind classes win over the component's.