# svelte-fuse

> Svelte wrapper for Fuse.js.

Latest version **0.1.0** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install svelte-fuse
pnpm add svelte-fuse
yarn add svelte-fuse
bun add svelte-fuse
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2026-08-03 |
| First published | 2023-08-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Yue Yang <g1enyy0ung@gmail.com> |
| Maintainers | g1eny0ung |
| Keywords | svelte, fuse.js, fuzzy, search |

## Links

- npm: https://www.npmjs.com/package/svelte-fuse
- Repository: https://github.com/g1eny0ung/svelte-fuse
- npm.io page: https://npm.io/package/svelte-fuse

## Dependencies (1)

- [fuse.js](https://npm.io/package/fuse.js.md) ^6.6.2

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.1.0 (latest) — 2026-08-03
- 0.0.1 — 2023-08-06

## README

# Svelte Fuse

Svelte wrapper for [Fuse.js](https://fusejs.io/).

## Installation

### NPM

```bash
npm install svelte-fuse
```

### Yarn

```bash
yarn add svelte-fuse
```

### PNPM

```bash
pnpm add svelte-fuse
```

## Usage

### Live demo

You can view the [demo](https://svelte-fuse.vercel.app/) and its [source code](https://github.com/g1eny0ung/svelte-fuse/blob/main/src/routes/%2Bpage.svelte) for a working example.

### Snippet

```svelte
<script lang="ts">
  import SvelteFuse from 'svelte-fuse';
  import type { ResultType } from 'svelte-fuse';

  type Contact = {
    id: number;
    name: string;
    email: string;
    phone: string;
    address: string;
    birthday: string;
  };

  const contacts: Contact[] = [
    {
      id: 1,
      name: 'John Doe',
      email: 'johndoe@example.com',
      phone: '123-456-7890',
      address: '123 Main Street, Anytown, CA 12345',
      birthday: '1980-01-01'
    }
    // ...
  ];

  let fuseOptions = $state({
    keys: ['name']
  });
  let query = $state('');
  let result = $state<ResultType<Contact>>([]);
</script>

<SvelteFuse list={contacts} options={fuseOptions} bind:query bind:result />
```

### Props

| Name    | Type                   | Description                  |
| ------- | ---------------------- | ---------------------------- |
| list    | `ReadonlyArray<T>`     | The list of items to search. |
| options | `Fuse.IFuseOptions<T>` | The Fuse.js options.         |
| query   | `string`               | The search query.            |
| result  | `ResultType<T>`        | The search result.           |

## How to contribute

If you have any ideas on how to improve this project, feel free to contribute. To do so, you can either open an issue or a pull request.

This project was developed with `@sveltejs/package`. Please read <https://svelte.dev/docs/kit/packaging> first if you want to change the source code.

## License

Under the [MIT License](LICENSE).

---
_Source: https://npm.io/package/svelte-fuse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
