# @nami-ui/textbox

> a input component.

Latest version **0.0.7** (published 2021-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nami-ui/textbox
pnpm add @nami-ui/textbox
yarn add @nami-ui/textbox
bun add @nami-ui/textbox
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2021-03-31 |
| First published | 2020-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bios Sun |
| Maintainers | biossun, biossun-by-nami-ui |
| Keywords | Input |

## Links

- npm: https://www.npmjs.com/package/@nami-ui/textbox
- Repository: https://github.com/BiosSun/nami-ui
- Homepage: https://nami-ui.biossun.org/docs/textbox
- Issues: https://github.com/BiosSun/nami-ui/issues
- npm.io page: https://npm.io/package/@nami-ui/textbox

## Dependencies (4)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1
- [nojiko](https://npm.io/package/nojiko.md) ^2.0.0
- [@nami-ui/utils](https://npm.io/package/@nami-ui/utils.md) ^0.0.6
- [@nami-ui/styles](https://npm.io/package/@nami-ui/styles.md) ^0.0.6

## Recent versions

- 0.0.7 (latest) — 2021-03-31
- 0.0.4 (test) — 2021-02-20
- 0.0.6 — 2021-02-21
- 0.0.5 — 2021-02-20
- 0.0.3 — 2020-12-19
- 0.0.2 — 2020-12-19
- 0.0.1 — 2020-12-19

## README

---
id: textbox
title: TextBox
subtitle: 文本框
---

用于输入一些简短的文本内容；

```jsx reactView
import { TextBox } from '@nami-ui/textbox'

export default () => {
  const [value, setValue] = useState('')

  return (
    <TextBox
      value={value}
      onChange={setValue}
      placeholder="Please enter some text ..."
    />
  )
}
```

## 占位符

通过设置 `placeholder` 属性，可以在文本框中值为空时显示一段占位文本（仅支持字符串）：

```jsx reactView
import { TextBox } from '@nami-ui/textbox'

export default () => <TextBox placeholder="请输入一些文本" />
```

## 禁用

通过设置 `disabled` 属性，可以设置文本框为禁用状态：

```jsx reactView
import { TextBox } from '@nami-ui/textbox'

export default () => (
  <TextBox disabled defaultValue="disabled" />
)
```

---
_Source: https://npm.io/package/@nami-ui/textbox · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
