New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@snack-uikit/input-private

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-uikit/input-private

  • 4.3.1-preview-53bd8747.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Input Private

Installation

npm i @snack-uikit/input-private

Changelog

export type Type = 'text' | 'password'
export type InputPrivateProps = RefAttributes<HTMLInputElement> &
  WithSupportProps<{
    name?: string;
    value: string;
    onChange?(value: string, e?: ChangeEvent<HTMLInputElement>): void;
    id?: string;
    className?: string;
    placeholder?: string;
    type?: Types;
    disabled?: boolean;
    autoComplete?: boolean;
    maxLength?: number;
    onFocus?: FocusEventHandler<HTMLInputElement>;
    onBlur?: FocusEventHandler<HTMLInputElement>;
    prefix?: ReactNode;
    postfix?: ReactNode;
    onClick?: MouseEventHandler<HTMLInputElement>;
    onMouseDown?: MouseEventHandler<HTMLInputElement>;
  }>;

InputPrivate

Props

nametypedefault valuedescription
namestring-Значение html-атрибута name
valuestring-Значение input
onChange(value: string, e?: ChangeEvent<HTMLInputElement>) => void-Колбек смены значения
placeholderstring-Значение плейсхолдера
idstring-Значение html-атрибута id
classNamestring-CSS-класс
typeenum Type: "number", "text", "password"textТип инпута
disabledboolean-Является ли поле деактивированным
readonlyboolean-Является ли поле доступным только для чтения
autoCompletestring | booleanfalseВключен ли автокомплит для поля
maxLengthnumber-Максимальная длина вводимого значения
minnumber-Минимальное значение поля
maxnumber-Максимальное значение поля
stepstring | number-Максимальное значение поля
onFocusFocusEventHandler<HTMLInputElement>-Колбек обработки получения фокуса
onBlurFocusEventHandler<HTMLInputElement>-Колбек обработки потери фокуса
onKeyDownKeyboardEventHandler<HTMLInputElement>-Колбек обработки нажатия клавиши клавиатуры
tabIndexnumber-Значение атрибута tab-index
onClickMouseEventHandler<HTMLInputElement>-Колбек обработки клика
onMouseDownMouseEventHandler<HTMLInputElement>-Колбек обработки нажатия кнопки мыши
keyKey-
refLegacyRef<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

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

FAQs

Package last updated on 09 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc