Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-input-completion

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-input-completion - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "react-input-completion",
"version": "0.0.3",
"version": "0.0.4",
"description": "A cross-browser autocomplete component for React",

@@ -5,0 +5,0 @@ "repository": "https://www.github.com/imcnally/react-input-completion",

# react-input-completion
A cross-browser autocomplete component for React. `<InputCompletion>` defaults to the native `<datalist>` and polyfills any unsupported browsers.
A cross-browser autocomplete component for React.
## Usage:
`<InputCompletion>` defaults to the native `<datalist>` and polyfills any unsupported browsers, with no external dependencies.
## Usage
`<InputCompletion>` wraps an input, and connects it to a list of `options`.
### Example
```jsx
// in your component's render function
var browsers = ['Chrome', 'Firefox', 'IE', 'Safari'];
var onChange = this.onChange.bind(this);
<InputCompletion options={browsers} name="browsers" onValueChange={onChange}>
<input placeholder="Enter your browser name" />
</InputCompletion>
```
### Props
`onValueChange` - Callback function for when input value changes. Arguments: DOMEvent, value.
`options` - Array of suggestions to present to the user
`name` - Unique identifier for the list
```jsx
<InputCompletion options={} name=''>
<input />
</InputCompletion>
```
### Styles
Default styles (for fallback to match native) are available in react-input-completion.css.
Default styles (for fallback to match native
) are available in react-input-completion.css.

@@ -22,0 +34,0 @@ ## Development

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc