Skip to content

Combobox

Autocomplete: a text input that filters a listbox as you type. Keyboard navigation and aria-activedescendant included.

CSS + mian.js JSON Markdown Registry item

Framework picker

  • Astro
  • Laravel
  • Next.js
  • Nuxt
  • Ruby on Rails
  • SvelteKit
  • WordPress

Installation

Everything ships in one stylesheet and one small script. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">
<script src="https://mian.ro/dist/mian.js" defer></script>

Prefer to own the files? /r/combobox.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-comboboxWrapper.
mn-combobox-listThe listbox; children are role="option".
mn-combobox-toggleOptional chevron button.

Accessibility

  • Follows the WAI-ARIA combobox pattern: role="combobox", aria-expanded, aria-controls, aria-activedescendant.
  • ArrowDown opens and moves, Enter selects, Escape closes then clears. Focus never leaves the input.
  • Emits mn:change with the selected value.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page