Searchable Select

Advanced selection controls for B2B systems - from a searchable combobox to a premium multi-select with categories.

Searchable Select (Combobox)

Replaces the classic <select> tag. Opening and closing works natively via the Popover API - the menu renders in the top layer, so it isn't clipped even inside a modal.

<div class="select-search">
  <button type="button" class="input select-search-trigger" popovertarget="client-select">
    <span>Choose from the list...</span>
  </button>

  <!-- [popover] = top layer: the menu isn't clipped even in a modal -->
  <div class="select-search-menu" popover id="client-select">
    <input type="text" class="input select-search-input" placeholder="Search...">
    <div class="select-search-list">
      <div class="select-search-option" data-value="1">Option 1</div>
      <div class="select-search-option" data-value="2">Option 2</div>
    </div>
  </div>

  <!-- Hidden field for the backend -->
  <input type="hidden" name="client_id" class="select-search-hidden">
</div>

Plain Select (no search)

The .select-search-input field is optional - when omitted, the component works like a classic <select>, while keeping the top layer (no clipping in modals) and a consistent look.

<div class="select-search">
  <button type="button" class="input select-search-trigger" popovertarget="status-select">
    <span>Planning</span>
  </button>

  <!-- No .select-search-input = plain select -->
  <div class="select-search-menu" popover id="status-select">
    <div class="select-search-list">
      <div class="select-search-option is-selected" data-value="planning">Planning</div>
      <div class="select-search-option" data-value="pending">Pending</div>
      <div class="select-search-option" data-value="in-progress">In Progress</div>
    </div>
  </div>

  <input type="hidden" name="status" class="select-search-hidden" value="planning">
</div>

Premium Multi Select

Selecting multiple options with a built-in search, category grouping, and interactive option cards.

Popular
Other
<div class="custom-select">
  <button type="button" class="custom-select-trigger" popovertarget="skills-select">
    <!-- Tags and arrow -->
  </button>

  <!-- [popover] = top layer: the menu isn't clipped even in a modal -->
  <div class="custom-select-dropdown" popover id="skills-select">
    <!-- Search box -->
    <div class="custom-select-search">
      <input type="text" class="input" placeholder="Search...">
    </div>

    <div class="custom-select-list">
      <div class="custom-select-category">Category</div>

      <!-- Option card -->
      <label class="custom-select-option">
        <div class="flex-1">
          <div class="fw-bold">Option 1</div>
        </div>
        <input type="checkbox" class="form-check-input">
      </label>
    </div>
  </div>
</div>

Select in a Modal (top layer)

The popover menu renders in the browser's top layer - above an open <dialog> and outside its scrollable content (.card-body has overflow-y: auto). This means the option list is never clipped to the modal's edge.

New Order

<dialog id="modalSelectDemo" class="modal-dialog">
  <div class="card">
    <div class="card-body">
      <!-- The select works in a modal with no extra effort:
           the [popover] menu renders in the top layer, ABOVE the dialog -->
      <div class="select-search">
        <button type="button" class="input select-search-trigger" popovertarget="modal-select">
          <span>Choose a client...</span>
        </button>
        <div class="select-search-menu" popover id="modal-select">
          <!-- search box + options -->
        </div>
        <input type="hidden" name="client_id" class="select-search-hidden">
      </div>
    </div>
  </div>
</dialog>