Combobox

Type to filter, arrows to move, Enter to choose; the list’s height springs as it filters.

Features

  • Type to filter, arrows to move, Enter to choose.

Use it for

  • Long lists: languages, models, people.

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react @base-ui/react motion lucide-react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

Usage

import { Combobox } from 'runets'

<Combobox label="Language" items={['Rust', 'TypeScript', 'Python']} />

API

PropTypeWhat it does
itemsstring[]Options.
onValueChange(v) => voidCalled on choice.

Accessibility

Source

The code is in src/kit/inputs.tsx in runets, MIT licensed.