A simple typeahead search implementation for Haxe and JavaScript

To install, run:

haxelib install fancysearch 1.0.0-beta.2 

See using Haxelib in Haxelib documentation for more information.

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.

2 years ago

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser!

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github