npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-bootstrap-autosuggest

v0.5.0

Published

Autosuggest component for react-bootstrap

Downloads

453

Readme

react-bootstrap-autosuggest

react-bootstrap-autosuggest is a ReactJS component that provides a combo-box input control styled using Bootstrap. It is both inspired by and depends upon react-bootstrap.

See the live demo on the home page.

Getting started

Install react-bootstrap-autosuggest using npm:

npm install react-bootstrap-autosuggest --save

Import the CommonJS module (which has been transpiled to ES3-compatible form using Babel):

import Autosuggest from 'react-bootstrap-autosuggest'

Alternatively, load the minified UMD (Universal Module Definition) build:

<script src="path-to-dist/react-bootstrap-autosuggest.min.js"></script>

Note that the required CSS styles (in addition to Bootstrap) are included automatically for either build. The CommonJS module executes require('Autosuggest.scss'), which requires that you configure the appropriate Sass loader (such as Webpack's sass-loader) in your application build. The UMD build uses an embedded stylesheet and Webpack's style-loader to automatically inject a <style> tag into the document head.

Motivation

There are many auto-complete / auto-suggest / combo-box / enhanced-select input controls out there. However, I could not find any that met all of my requirements:

  • True combo-box: Combines a drop-down list and a single-line editable text box (not just a search box). The final input value need not come from a list of options (though optionally it may be required to). The user is free to enter any value, and the developer need not employ workarounds (like continually adding the current input value to the list of options) to achieve this.
  • React: Available as a ReactJS component that does not depend on other frameworks, such as jQuery.
  • Bootstrap: Supports full Bootstrap styling (including input group add-ons and sizing, validation states, and feedback icons).
  • Dynamic: Supports dynamically loading suggested values based on the current input value.
  • Multi-select: Supports selecting multiple values.
  • Accessible: Provides keyboard accessibility and compatibility with assistive technologies.
  • Production ready and actively maintained.

Supported browsers

react-bootstrap-autosuggest aims to support all modern desktop and mobile browsers. Despite some incomplete work to support IE 8, only IE 9+ are expected to work. If you find a browser-specific problem, please report it along with any code necessary to reproduce it. For visual/layout issues, please attach an image of the issue.

Support

Please use GitHub issues for bug reports or feature requests. For usage questions, please use Stack Overflow to ask a question with the rbs-autosuggest tag.

Contributions

Contributions in the form of GitHub pull requests are welcome. Please adhere to the following guidelines:

  • Before embarking on a significant change, please create an issue to discuss the proposed change and ensure that it is likely to be merged.
  • Follow the coding conventions used throughout the project, including 2-space indentation and no unnecessary semicolons. Many conventions are enforced using eslint.
  • Include unit tests for any new code. This project maintains 100% code coverage.
  • Any contributions must be licensed under the ISC license.

License

react-bootstrap-autosuggest is available under the ISC license.