# widgets **Repository Path**: indexea/widgets ## Basic Information - **Project Name**: widgets - **Description**: Indexea 搜索 Web 组件库,主要提供四个搜索组件包括:搜索框、搜索对话框、查询结果列表、推荐结果列表 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: https://indexea.com - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-12-15 - **Last Updated**: 2024-07-25 ## Categories & Tags **Categories**: webui **Tags**: None ## README This is the repository for all Indexea web components ## 4 widgets ![widgets](/widgets.jpg) ## Installation ```shell $ npm i @indexea/widgets or $ yarn add @indexea/widgets ``` ## Usage ### SearchBox ```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 } }) ``` ### SearchDialog ```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 } }) ``` ### QueryBox ```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 } }) ``` ### RecommBox ```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 } }) ```