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

@react-md/autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-md/autocomplete

Create an accessible autocomplete component that allows a user to get real-time suggestions as they type within an input. This component can also be hooked up to a backend API that handles additional filtering or sorting.

  • 2.2.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@react-md/autocomplete

Create an accessible autocomplete component that allows a user to get real-time suggestions as they type within an input. This component can also be hooked up to a backend API that handles additional filtering or sorting.

Installation

$ npm install --save @react-md/autocomplete

Documentation

You should check out the full documentation for live examples and more customization information, but an example usage is shown below.

Usage

The AutoComplete component just requires:

  • an id to identify the field (required for a11y)
  • a list of data that can be a list of string, number, or object

However, it is recommended to also provide a label and placeholder text to help the user understand this component.

import React, { FC } from "react";
import { AutoComplete } from "@react-md/autocomplete";

const fruits = [
  "Apple",
  "Apricot",
  "Banana",
  "Blueberry",
  "Cranberry",
  "Kiwi",
  "Peach",
  "Plum",
  "Strawberry",
];

const Example: FC = () => (
  <AutoComplete
    id="search-fruits"
    name="fruits"
    label="Fruits"
    placeholder="Kiwi..."
    data={fruits}
  />
);

export default Example;

Keywords

FAQs

Package last updated on 02 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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