fancysearch 1.0.0-beta.2

A simple typeahead search implementation for Haxe and JavaScript

Released 2016-02-10.

To install, run:

haxelib install fancysearch 1.0.0-beta.2

See using Haxelib in Haxelib documentation for more information.

Current version1.0.0-beta.2
StatisticsInstalled 59 times

Fancy Search

Fancy Search is a typeahead search implementation for the web. It is written in Haxe and compiles to a JavaScript target. The library can be imported and used directly in Haxe projects, or it can be bundled into JavaScript projects using CommonJS (coming soon).

The result may look something like the following:

Fancy Search screen capture

For live demos, see:

Getting Started

With Haxe

Grab the latest version of the library from Haxelib:

haxelib install fancy

Import the Search module, create a new instance, and away you go.

import fancy.Search;

class Main {
  static function main() {
    var search = Search.createFromSelector(".some-selector input", {
      suggestionOptions : {
        suggestions : ["Apple", "Banana", "Barley", "Black Bean", "Carrot", "Corn"]

For a slightly larger example, see the demo in this repository.

With JavaScript

FancySearch has not yet been published to npm. Soon...

API Documentation

You can find complete documentation on RawGit, but the following should be enough to get started.

Styling and Customization

Fancy Search is not opinionated when it comes to styles. In fact, most of the basic functionality (showing and hiding the suggestion list, for example) is the result of changing classes rather than hard-coded styles. This means that without some style guidance, Fancy Search probably won't behave the way you expect it to. A simple CSS example is provided to give you a starting point.