Giter Site home page Giter Site logo

travelton / instantsearch.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from algolia/instantsearch

0.0 1.0 0.0 234.48 MB

:zap: Lightning-fast search for your apps, by Algolia

Home Page: https://community.algolia.com/instantsearch.js

License: MIT License

JavaScript 85.89% HTML 4.20% CSS 9.37% Shell 0.54%

instantsearch.js's Introduction

InstantSearch.js

InstantSearch.js is a library for building blazing fast search-as-you-type search UIs with Algolia.


Build Status Version License

InstantSearch.js is a vanilla JavaScript library that lets you create an instant-search result experience using Algoliaโ€™s search API. It is part of the InstantSearch family:

InstantSearch.js | React InstantSearch | Vue InstantSearch | Angular InstantSearch | React InstantSearch Native | InstantSearch Android | InstantSearch iOS

Table of contents

Why

You should be using InstantSearch if you want to:

  • Design search experiences with best practices
  • Customize your components at will
  • Remain independent from external frameworks

Getting started

Using InstantSearch.js is as simple as adding this JavaScript code to your page:

// 1. Instantiate the search
const search = instantsearch({
  appId: 'latency',
  apiKey: '6be0576ff61c053d5f9a3225e2a90f76',
  indexName: 'instant_search',
});

// 2. Create an interactive search box
search.addWidget(
  instantsearch.widgets.searchBox({
    container: document.querySelector('#searchBox'),
    placeholder: 'Search for products',
  })
);

// 3. Plug the search results into the product container
search.addWidget(
  instantsearch.widgets.hits({
    container: document.querySelector('#products'),
    templates: {
      item: '{{{_highlightResult.name.value}}}',
    },
  })
);

// 4. Make the brands refinable
search.addWidget(
  instantsearch.widgets.refinementList({
    container: document.querySelector('#brand'),
    attributeName: 'brand',
  })
);

// 5. Start the search!
search.start();

Preview
Edit on CodeSandbox

To learn more about the library, follow the getting started guide or check how to add it to your own project.

Documentation

The documentation is available at community.algolia.com/instantsearch.js.

Demos

E-commerce Media Travel
E-commerce demo preview Media demo preview Tourism demo preview

See more examples on the website.

Playground

You can get to know InstantSearch.js on this playground.

Start by adding widgets and tweaking the display. Once you feel familiar with the library, we recommend following the getting started guide.

Browser support

We support the last two versions of major browsers (Chrome, Edge, Firefox, Safari).

To support IE11, we recommend loading polyfill.io with the following URL https://cdn.polyfill.io/v2/polyfill.min.js?features=default,Array.prototype.includes

Contributing

We welcome all contributors, from casual to regular ๐Ÿ’™

  • Bug report. Is something not working as expected? Send a bug report.
  • Feature request. Would you like to add something to the library? Send a feature request.
  • Documentation. Did you find a typo in the doc? Click on the edit this page button.
  • Development. If you don't know where to start, you can check the open issues that are tagged easy, the bugs or chores.

To start contributing to code, you need to:

  1. Fork the project
  2. Clone the repository
  3. Install the dependencies: yarn
  4. Run the development mode: yarn run dev
  5. Open dev-novel

Please read our contribution process to learn more.

We're hiring

Join the InstantSearch squad and help us build tools that will empower thousands of other developers.

Open positions:

License

InstantSearch.js is MIT licensed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.