atom / atom-select-list

An etch component to show select lists with fuzzy filtering, keyboard navigation and other cool features.
MIT License
33 stars 33 forks source link
Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our official announcement

atom-select-list

This module is an etch component that can be used in Atom packages to show a select list with fuzzy filtering, keyboard/mouse navigation and other cool features.

Installation

npm install --save atom-select-list

Usage

After installing the module, you can simply require it and use it as a standalone component:

const SelectList = require('atom-select-list')

const usersSelectList = new SelectList({
  items: ['Alice', 'Bob', 'Carol']
})
document.body.appendChild(usersSelectList.element)

Or within another etch component:

render () {
  return (
    <SelectList items={this.items} />
  )
}

API

When creating a new instance of a select list, or when calling update on an existing one, you can supply a JavaScript object that can contain any of the following properties: