# bee-form-control

> form-control ui component for react

Latest version **2.0.28** (published 2022-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install bee-form-control
pnpm add bee-form-control
yarn add bee-form-control
bun add bee-form-control
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.28 |
| Published | 2022-03-09 |
| First published | 2016-10-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 7 |
| Unpacked size | 63.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | yonyou |
| Maintainers | honely1314, xiaoshutong, yonyoufed, jonyw, guoyongfeng, kvkens, whizbz, npm_yx, bjyxszd, tinper-bot, houjitong, gaox2025f, gcht163, cnkvkens, diozhu, wangjings123, ahua52 |
| Keywords | react, react-component, react-form-control, iuap-design, neoui-react, form-control |

## Links

- npm: https://www.npmjs.com/package/bee-form-control
- Repository: https://github.com/tinper-bee/form-control
- Issues: https://github.com/tinper-bee/form-control/issues
- npm.io page: https://npm.io/package/bee-form-control

## Dependencies (7)

- [express](https://npm.io/package/express.md) ^4.16.3
- [omit.js](https://npm.io/package/omit.js.md) ^2.0.2
- [warning](https://npm.io/package/warning.md) ^3.0.0
- [bee-icon](https://npm.io/package/bee-icon.md) ^1.0.3
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [rc-textarea](https://npm.io/package/rc-textarea.md) ^0.3.0
- [tinper-bee-core](https://npm.io/package/tinper-bee-core.md) latest

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 2.0.28 (latest) — 2022-03-09
- 2.0.9-alpha.1 (alpha) — 2019-09-24
- 2.0.3 (beta) — 2019-05-20
- 2.0.27 — 2021-11-18
- 2.0.26 — 2021-10-28
- 2.0.25 — 2021-10-27
- 2.0.24 — 2020-08-13
- 2.0.23 — 2020-07-20
- 2.0.22 — 2020-07-02
- 2.0.21 — 2020-06-02
- 2.0.20 — 2020-05-29
- 2.0.19 — 2020-04-24
- 2.0.18 — 2020-03-28
- 2.0.17 — 2020-03-27
- 2.0.16 — 2020-03-27
- … 62 more at https://npm.io/package/bee-form-control/versions

## README

# bee-form-control 
[![npm version](https://img.shields.io/npm/v/bee-form-control.svg)](https://www.npmjs.com/package/bee-form-control)
[![Build Status](https://img.shields.io/travis/tinper-bee/bee-form-control/master.svg)](https://travis-ci.org/tinper-bee/bee-form-control)
[![Coverage Status](https://coveralls.io/repos/github/tinper-bee/bee-form-control/badge.svg?branch=master)](https://coveralls.io/github/tinper-bee/bee-form-control?branch=master)

用 `<FormControl>` 来代替 `<input>`, `<textarea>`, and `<select>`


#### 安装步骤

```sh
$ git clone https://github.com/tinper-bee/bee-form-control
$ cd bee-form-control
$ npm install
$ npm run dev
```

## 使用

使用单独的bee-form-control包
#### 组件引入
先进行下载bee-form-control包
```
npm install --save bee-form-control
```
组件调用
```js
import FormControl from 'bee-form-control';
React.render(<div>
    <div>
        <FormControl placeholder="input placeholder" ref="test" />
    </div>
</div>, document.getElementById('target'));
```
#### 样式引入
- 可以使用link引入dist目录下bee-form-control.css
```
<link rel="stylesheet" href="./node_modules/build/bee-form-control.css">
```
- 可以在js中import样式
```js
import "./node_modules/src/FormControl.scss"
//或是
import "./node_modules/build/bee-form-control.css"
```




## API
|参数|说明|类型|默认值|
|:--|:---|:--|:---|
|className|类名|string|-|
|componentClass|说明表单类型(`input`,`textarea`)|string|'input'|
|type|类型(`text`,`search`, `submit`,'checkbox',...详情http://www.w3school.com.cn/html5/att_input_type.asp)|string|'text'|
|onChange|input值发生改变触发的回调|func|-|
|onKeyDown|keydown回调|func|-|
|value|input当前值|string|-|
|defaultValue|input默认值|string|-|
|onSearch|input type="search" 回车和点击搜索按钮的回调|func|-|
|showClose|是否显示清空按钮|bool|-|
|focusSelect|设置当focus的时候是否选择内容|bool|false|

---
_Source: https://npm.io/package/bee-form-control · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
