An open API service indexing awesome lists of open source software.

https://github.com/munawwar/preact-combobox

A Preact multi-select combobox component
https://github.com/munawwar/preact-combobox

Last synced: 7 months ago
JSON representation

A Preact multi-select combobox component

Awesome Lists containing this project

README

          

# PreactCombobox

Work-in-progress: DO NOT USE ON PRODUCTION!

A Preact multi-select combobox component

![screenshot](./screenshot.webp)

## Installation

```bash
# `npm add preact` first
npm add preact-combobox @popperjs/core
```

## Usage

```jsx
import PreactCombobox, { defaultLabelTransform } from "preact-combobox";

const options = [
{ label: "Option 1", value: "option-1" },
{ label: "Option 2", value: "option-2" },
{ label: "Option 3", value: "option-3" },
];

function App() {
const [values, setValues] = useState([]);

return (
<>

Basic example


Optional stuff



>
);
}
```

## Run Demo

```bash
npm run dev
# open http://localhost:3050/example/example.html on a browser
```