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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ts_xinput

v1.5.0

Published

____

Downloads

11

Readme

API


参数 | 说明 | 类型 | 默认值 | :------| :------ | :------ | :------ | addonAfter | 带标签的 input,设置后置标签 | string | ReactNode | addonBefore | 带标签的 input,设置前置标签 | string | ReactNode | debounce | onChange事件是否开启延迟 | 'on' | 'off' | true | debounceTime | onChange延迟时间 | number | 300 | defaultValue | 输入框默认内容 | any | disabled | 是否禁用状态 | boolean | false | empty | 是否允许空值 | boolean | true | id | 输入框的 id | string | label | input前方标签(输入框外) | ILabel | maxLength | 最大长度 | number | name | 输入框名字 | string | placeholder | 可描述输入字段预期值的提示信息 | string | size | 输入框尺寸 | 'large' | 'default' | 'small' | type | 输入框类型 | 'string' | 'number' | 'range' | validate | 验证信息 | IValidate | value | 输入框的的值 | any | width | 输入框的整体宽度 | number | onInput | 输入框输入内容时的回调 | function(e) | onChange | 输入框内容变化时的回调 | function(e) | onPressEnter | 按下回车键时的回调 | function(e) | onKeyDown | 按下按键时的回调 | function(e) | onKeyUp | 抬起按键时的回调 | function(e) | onFocus | 输入框获得焦点时的回调 | function(e) | onBlur | 输入框失去焦点时的回调 | function(e) | prefix | 带有前缀图标的 | input string | React.ReactNode suffix | 带有后缀图标的 | input string | React.ReactNode cleanButton | 清空内容的按钮 | boolean |

ILabel


参数 | 说明 | 类型 | 默认值 :------| :------ | :------ | :------ | text | 标签内容 | string | width | 标签宽度 | number | textAlign | 内容位置 | 'left' | 'center' | 'right' | 'right' style | 标签样式 | React.CSSProperties |

IValidate


参数 | 说明 | 类型 | 默认值 :------| :------ | :------ | :------ | rule | 验证规则 | RegExp | 'Vname' | 'VnameCN' | 'Vnumber' | mes | 自定义验证规则时的提示信息 | string | max | 数字的最大值 | number min | 数字的最小值 | number extraResult | 补充的验证结果 | function(e) => boolean | true extraMessage | 补充的验证结果提示信息 | string | forbid | 验证不通过时,是否允许输入 | boolean | true emptyMes | 值为空时的提示信息 | string |