npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

nuke-text-input

v0.0.3

Published

输入框

Downloads

20

Readme

TextInput

  • category: Components
  • chinese: 输入框
  • type: 基本

何时使用

TextInput 是唤起用户输入的基础组件。 当定义 multiline 输入多行文字时其功能相当于 textarea。

API

属性 | 说明 | 类型 | 默认值 -----|-----|-----|------ multiline【与multiple 重复,即将废弃】 | 定义该属性文本框可以输入多行文字 | boolean | false multiple | 定义该属性文本框可以输入多行文字 | boolean | false accessibilityLabel | 为元素添加标识 | string | 无 autoComplete | 添加开启自动完成功能 | boolean | false//todo autoFocus | 添加开启获取焦点 | boolean | false editable | 文本框是否可编辑 | boolean | true keyboardType【 与type 重复,即将废弃】 | 设置弹出哪种软键盘 可用的值有default ascii-capable numbers-and-punctuation url number-pad phone-pad name-phone-pad email-address decimal-pad twitter web-search numeric | string | default type| 设置弹出哪种软键盘 可用的值有text number url password tel date time email| string | text maxLength | 设置最大可输入值 | number | 无 maxNumberOfLines | 当文本框为mutiline时设置最多的行数 | number | 无 numberOfLines | 同上设置行数 | number | 无 placeholder | 设置文本框提示 | string | 无 password【与type 重复,即将废弃】 | 文本框内容密码显示 | | secureTextEntry【与type 重复,即将废弃】 | 同上文本框内容密码显示 | | value | 文本框的文字内容 | string | 无 style | 自定义样式|Object|无

同时 TextInput 响应下面几个事件:

  • onBlur: 文本框失焦时调用此函数。onBlur={() => console.log('失焦啦')}
  • onFocus: 文本框获得焦点时调用此函数
  • onChange: 文本框内容变化时调用此函数
  • onInput: 文本框输入内容时调用此函数

使用示例:

<TextInput
        placeholder="Enter text to see events"
        autoFocus multiline
        onFocus={() => console.log('onFocus')}
        onBlur={() => console.log('onBlur')}
        onInput={() => console.log('onInput')}
        style={{
                width: '1000rem',
                height: '1000rem',
                borderWidth:'1rem',
                borderStyle:'solid',
                borderColor:'#cccccc'
        }}
/>