0.0.7 • Published 3 years ago

@nami-ui/textbox v0.0.7

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

id: textbox title: TextBox

subtitle: 文本框

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

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

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

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

占位符

通过设置 placeholder 属性,可以在文本框中值为空时显示一段占位文本(仅支持字符串):

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

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

禁用

通过设置 disabled 属性,可以设置文本框为禁用状态:

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

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

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago