Socket
Book a DemoInstallSign in
Socket

@elemental-ui-alpha/autocomplete

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@elemental-ui-alpha/autocomplete

The autocomplete component is an input field that provides selectable suggestions as a user types into it.

npmnpm
Version
0.0.0
Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

Autocomplete

import { Autocomplete } from '@elemental-ui-alpha/autocomplete';

The autocomplete solution extends react-select. View the full API documentation on their website https://react-select.com. It allows users to quickly search through and select from large collections of options.

Single

Select a single item from a list of options.

<Autocomplete
  label="Select person"
  options={[
    { label: 'Teresa Foster', value: 1 },
    { label: 'Jennifer Thompson', value: 2 },
    { label: 'Katherine Wilson', value: 3 },
    { label: 'Scott Morris', value: 4 },
    { label: 'Russell Lopez', value: 5 },
    { label: 'Gregory Long', value: 6 },
    { label: 'Tina Flores', value: 7 },
    { label: 'Ashley Johnson', value: 8 },
    { label: 'Jose Coleman', value: 9 },
    { label: 'Jessica Taylor', value: 10 },
  ]}
/>

Multi

Select multiple items from a list of options.

const options = [
  { label: 'Teresa Foster', value: 1 },
  { label: 'Jennifer Thompson', value: 2 },
  { label: 'Katherine Wilson', value: 3 },
  { label: 'Scott Morris', value: 4 },
  { label: 'Russell Lopez', value: 5 },
  { label: 'Gregory Long', value: 6 },
  { label: 'Tina Flores', value: 7 },
  { label: 'Ashley Johnson', value: 8 },
  { label: 'Jose Coleman', value: 9 },
  { label: 'Jessica Taylor', value: 10 },
];
return (
  <Autocomplete
    isMulti
    label="Select person"
    defaultValue={options.slice(0, 3)}
    options={options}
  />
);

FAQs

Package last updated on 23 Apr 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