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

@snack-uikit/input-private

v5.0.0

Published

`npm i @snack-uikit/input-private`

Readme

Input Private

Installation

npm i @snack-uikit/input-private

Changelog

Description

  • Пакет @snack-uikit/input-private предоставляет базовый компонент InputPrivate для создания полей ввода в составе других компонентов библиотеки (например, FieldText, FieldSecure, FieldSelect).
  • Компонент является внутренним (private) и предназначен для использования внутри других пакетов UI Kit, а не напрямую в приложениях.
  • InputPrivate представляет собой обёртку над нативным HTML-элементом <input> с поддержкой всех стандартных атрибутов и событий, а также дополнительных возможностей: различные типы ввода (text, password, number, tel, email, url), режимы работы экранной клавиатуры (inputMode), управление автозаполнением, проверка орфографии и валидация через pattern.
  • Пакет также экспортирует вспомогательные хуки (useButtonNavigation, useClearButton) и утилиты (moveCursorToEnd, selectAll, runAfterRerender, isCursorInTheBeginning, isCursorInTheEnd) для расширенной работы с полями ввода, включая навигацию по кнопкам с клавиатуры и управление курсором.

Example

import { useState } from 'react';
import { InputPrivate } from '@snack-uikit/input-private';

function Example() {
  const [value, setValue] = useState('');

  return (
    <InputPrivate
      value={value}
      onChange={setValue}
      placeholder="Введите текст"
      type="text"
      inputMode="text"
      maxLength={100}
      autoComplete="off"
    />
  );
}

InputPrivate

Props

| name | type | default value | description | |------|------|---------------|-------------| | name | string | - | Значение html-атрибута name | | value | string | - | Значение input | | onChange | (value: string, e?: ChangeEvent<HTMLInputElement>) => void | - | Колбек смены значения | | placeholder | string | - | Значение плейсхолдера | | id | string | - | Значение html-атрибута id | | className | string | - | CSS-класс | | type | enum Type: "number", "text", "password", "tel", "email", "url" | text | Тип инпута | | inputMode | enum InputMode: "text", "tel", "email", "url", "decimal", "numeric", "search", "none" | text | Режим работы экранной клавиатуры | | disabled | boolean | - | Является ли поле деактивированным | | readonly | boolean | - | Является ли поле доступным только для чтения | | autoComplete | string \| boolean | false | Включен ли автокомплит для поля | | autoFocus | boolean | - | Включен ли авто-фокус для поля | | maxLength | number | - | Максимальная длина вводимого значения | | min | number | - | Минимальное значение поля | | max | number | - | Максимальное значение поля | | step | string \| number | - | Максимальное значение поля | | onFocus | FocusEventHandler<HTMLInputElement> | - | Колбек обработки получения фокуса | | onBlur | FocusEventHandler<HTMLInputElement> | - | Колбек обработки потери фокуса | | onKeyDown | KeyboardEventHandler<HTMLInputElement> | - | Колбек обработки начала нажатия клавиши клавиатуры | | onPaste | ClipboardEventHandler<HTMLInputElement> | - | Колбек обработки вставки значения | | tabIndex | number | - | Значение атрибута tab-index | | onClick | MouseEventHandler<HTMLInputElement> | - | Колбек обработки клика | | onMouseDown | MouseEventHandler<HTMLInputElement> | - | Колбек обработки нажатия кнопки мыши | | spellCheck | boolean | true | Значение атрибута spellcheck (проверка орфографии) | | pattern | string | - | Регулярное выражение валидного инпута | | key | Key | - | | | ref | LegacyRef<HTMLInputElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |

useButtonNavigation

hook

Позволяет использовать клавиатуру для навигации по элементам управления

useClearButton

hook

Позволяет использовать кнопку сброса значения

moveCursorToEnd

helper

Переносит курсор в конец поля ввода

selectAll

helper

Выделяет весь текст в поле ввода

runAfterRerender

helper

Откладывает колбек на следующий цикл EventLoop

isCursorInTheBeginning

helper

Проверяет находится ли курсор в начале поля ввода

isCursorInTheEnd

helper

Проверяет находится ли курсор в конце поля ввода