@indexea/widgets
Version:
This is the web components of Indexea, which contains multiple components such as SearchBox, SearchDialog, RecommListBox, etc
82 lines (60 loc) • 1.4 kB
Markdown
This is the repository for all Indexea web components

```shell
$ npm i @indexea/widgets
or
$ yarn add @indexea/widgets
```
```javascript
import { SearchBox } from '@indexea/widgets'
const app = document.getElementById('app')
new SearchBox({
target: app,
props: {
widget: '[widget ident]',
endpoint: 'https://api.indexea.com/v1' // Optional, change it in private cloud
}
})
```
```javascript
import { SearchDialog } from '@indexea/widgets'
const app = document.getElementById('app')
new SearchDialog({
target: app,
props: {
widget: '[widget ident]',
endpoint: 'https://api.indexea.com/v1' // Optional, change it in private cloud
}
})
```
```javascript
import { QueryBox } from '@indexea/widgets'
const app = document.getElementById('app')
new QueryBox({
target: app,
props: {
widget: '[widget ident]',
endpoint: 'https://api.indexea.com/v1', // Optional, change it in private cloud
xxxx: xxxx // Other args
}
})
```
```javascript
import { RecommBox } from '@indexea/widgets'
const app = document.getElementById('app')
new RecommBox({
target: app,
props: {
widget: '[recomm ident]',
endpoint: 'https://api.indexea.com/v1', // Optional, change it in private cloud
xxxx: xxxx // Other args
}
})
```