# fox-auto-width-input

> selector

Latest version **0.0.4** (published 2021-08-08) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install fox-auto-width-input
pnpm add fox-auto-width-input
yarn add fox-auto-width-input
bun add fox-auto-width-input
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2021-08-08 |
| First published | 2021-08-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 53.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lf |
| Maintainers | littlefox9527 |
| Keywords | tag-input |

## Links

- npm: https://www.npmjs.com/package/fox-auto-width-input
- npm.io page: https://npm.io/package/fox-auto-width-input

## Dependencies (2)

- [react](https://npm.io/package/react.md) ^16.13.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.13.0

## Recent versions

- 0.0.4 (latest) — 2021-08-08
- 0.0.3 — 2021-08-08
- 0.0.2 — 2021-08-08

## README

### 介绍
fox-auto-width-input
根据字符自动计算input宽度
### 依赖
react >= 16.9

### API
  value?: string
  inputEl?: React.MutableRefObject<any>
  inputChange?: (value:string,e:React.ChangeEvent<HTMLInputElement>)=>void
  inputDel?: (e:React.ChangeEvent<HTMLInputElement>)=>void
  inputEnter?: (e:React.ChangeEvent<HTMLInputElement>)=>void
  className?: string
| API          | type          | Desc                                   |
| :----------- | ------------- | -------------------------------------- |
| value        | string        | input value                           |
| inputEl      | ref (useRef)  | ref                     |
| inputChange  | (value:string,e:React.ChangeEvent<HTMLInputElement>)=>void | input的onChang事件                  |
| inputDel     | (e:React.ChangeEvent<HTMLInputElement>)=>void           | backspace事件                        |
| inputEnter   | (e:React.ChangeEvent<HTMLInputElement>)=>void        | enter事件                 |
| className    | string        |  calssName      |


### demo

```react
import {AutoWidthInput，useInputFocuse} from 'fox-auto-width-input'

const App = () => {
  const [ inputEl, focusAutoWidthInput ] = useInputFocuse()
  return (
    <div className="content" onClick={focusAutoWidthInput}>
      <AutoWidthInput
        value={ 'qq' }
        inputEl={ inputEl }
        inputDel={ e => { console.log('inputdel', e) } }
        inputEnter={ e => { console.log('inputenter', e) } }
        inputChange={(value,e)=>{ console.log('inputChange',value,e) } }
      />
    </div>
  )
}
```


"webpack": "^4.44.1",
    "webpack-cli": "^3.3.12",
    "webpack-dev-server": "^3.11.0"

---
_Source: https://npm.io/package/fox-auto-width-input · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
