1.0.0-beta.0 • Published 4 years ago

@clinia/vision v1.0.0-beta.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Version License Build Status Pull reminders

VisionJS is a vanilla JavaScript library that lets you create a healthcare search eperience using Clinia's search API. It is part of the Vision product family:

VisionJS | React Vision | Angular Vision | React Vision Native | Vision Android

Why

You should be using Vision if you want to:

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

Getting started

Using VisionJS is as simple as adding this JavaScript code to your page:

// 1. Instantiate the search
const search = vision({
  indexName: 'health_facility',
  searchClient: clinia('appId', 'apiKey')
});

search.addWidgets([
  // 2. Create an interactive search box
  vision.widgets.searchBox({
    container: '#searchbox',
    placeholder: 'Search for pharmacies'
  }),

  // 3. Plug the search results into the healthfacilities container
  vision.widgets.records({
    container: '#healthfacilties',
    templates: {
      item: '{{name}}',
    },
  }),
]);

// 4. Start the search
search.start();

TODO: link to website documentation js guides

Installation

npm install @clinia/vision clinia
# or
yarn add @clinia/vision clinia

Documentation

The documentation is available on the Clinia website (coming soon)

Playground

You can play around with VisionJS on this playground (coming soon)

Browser support

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

License

VisionJS is MIT licensed.