Code Monkey home page Code Monkey logo

multicomplete's Introduction

useMultiComplete

The react hook to create multi selection autocomplete components.

Website - Docs - Examples

pnpm add multicomplete

Features

  • ๐Ÿ“ฆ Tiny - 1.5kb gzipped
  • ๐ŸŽจ Customizable - style it to your needs
  • โ™ฟ Accessible - fully wai-aria compliant
  • ๐Ÿ“– Typescript - written in typescript
  • ๐Ÿ“ฑ Mobile - works on mobile devices
  • ๐ŸŒ™ Themeable - use your own theme
  • ๐Ÿ“š Examples - examples for different scenarios

Usage

Import the hook and use it in your component.

import { useMultiComplete } from 'multicomplete'

const handlers = useMultiComplete({
  options,
  values,
  onChange,
  id,
  isOpen,
  onOpenChange,
})

Helpers

There are helpers to make working with complex data values easier.

import {
  createSubstringFilter,
  createEqualityFunction
} from 'multicomplete'

type Item = {
  id: string
  name: string
}

const isEqual = createEqualityFunction<Item>(v => v.id)
// a.k.a. a.id === b.id

const filter = createSubstringFilter<Item>(v => v.name)
// a.k.a. value.name.toLowerCase().includes(query.toLowerCase())

multicomplete's People

Contributors

renovate[bot] avatar jotoh98 avatar

Watchers

 avatar

multicomplete's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • pnpm/action-setup v2.4.0
  • actions/setup-node v4
npm
docs/package.json
  • @floating-ui/react ^0.26.2
  • next 14.1.4
  • react ^18
  • react-dom ^18
  • zustand ^4.4.6
  • @types/node ^20
  • @types/react ^18
  • @types/react-dom ^18
  • autoprefixer ^10.4.16
  • eslint ^8
  • eslint-config-next 14.1.4
  • multicomplete ^0.2.1
  • postcss ^8
  • prettier ^3.1.0
  • prettier-plugin-tailwindcss ^0.5.7
  • raw-loader ^4.0.2
  • tailwindcss ^3.3.5
  • typescript ^5
  • node >=18.0.0
package.json
  • @size-limit/preset-small-lib ^11.0.0
  • @testing-library/jest-dom ^6.1.4
  • @testing-library/react ^14.1.2
  • @testing-library/user-event ^14.5.1
  • @types/react ^18.2.37
  • @types/react-dom ^18.2.15
  • @typescript-eslint/eslint-plugin ^6.11.0
  • @typescript-eslint/parser ^6.11.0
  • @vitejs/plugin-react ^4.2.0
  • @vitest/coverage-v8 ^0.34.6
  • @vitest/ui ^0.34.6
  • cz-conventional-changelog ^3.3.0
  • eslint ^8.53.0
  • eslint-plugin-react-hooks ^4.6.0
  • eslint-plugin-react-refresh ^0.4.4
  • jsdom ^22.1.0
  • prettier ^3.1.0
  • prettier-plugin-tailwindcss ^0.5.7
  • size-limit ^11.0.0
  • tsup ^8.0.0
  • typescript ^5
  • vitest ^0.34.6
  • react >=16
  • react-dom >=16
  • pnpm 8.15.5

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.