English | [简体中文](./README-zh_CN.md)

# @ray-js/research-bar

[![latest](https://img.shields.io/npm/v/@ray-js/research-bar/latest.svg)](https://www.npmjs.com/package/@ray-js/research-bar) [![download](https://img.shields.io/npm/dt/@ray-js/research-bar.svg)](https://www.npmjs.com/package/@ray-js/research-bar)

> Search bar, including code scanning function

## Installation

```sh
$ npm install @ray-js/research-bar
# or
$ yarn add @ray-js/research-bar
```

## Develop

```sh
# watch compile component code
yarn watch
# watch compile demo
yarn start:tuya
```

## Usage

```tsx
import Foo from '@ray-js/research-bar';

export default function Foo() {
  return (
    <View className={styles.view}>
      <DemoBlock title="basic" />
      <View className={styles.line}>
        <Template placeholder="Enter search keywords" />
      </View>

      <View className={styles.line}>
        <Template placeholder="Enter search keywords" round />
      </View>

      <DemoBlock title="dark" />
      <View className={styles.line}>
        <Template placeholder="Enter search keywords" themeType="dark" />
      </View>

      <View className={styles.line}>
        <Template placeholder="Enter search keywords" round themeType="dark" />
      </View>

      <DemoBlock title="Scan code" />
      <View className={styles.line}>
        <Template showScan />
      </View>
    </View>
  );
}
```