Forms

Code input.

One native input for codes, with paste and autofill kept intact.

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/otp-input.json

Registry setup · Examples · API and behavior · Open the playground

COMPLETE EXAMPLES

Use it in context.

Each example includes its imports, data and state. The preview runs that same source. Include the stylesheet once in your application.

Native form entry and reset

A single named field supports defaults, completion feedback and native reset.

Keyboard

  • Native selection, Delete and Backspace edit the same input.
  • Reset restores the initial code.

States covered

  • Default value
  • Completion
  • Disabled field
  • Reset

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-otp-uncontrolled.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {useState} from 'react';
import {Button,OTPInput} from '@bld8/ui';
export default function UncontrolledCodeExample(){
  const [status,setStatus]=useState('');
  return <form onSubmit={event=>{event.preventDefault();setStatus('Entered code: '+new FormData(event.currentTarget).get('backupCode'));}}>
    <OTPInput label="Backup example code" name="backupCode" length={4} defaultValue="12" required onComplete={()=>setStatus('All four positions are filled.')}/>
    <OTPInput label="Locked example code" length={4} defaultValue="1234" disabled/>
    <Button type="submit">Read backup example</Button><Button type="reset" variant="secondary">Reset backup example</Button>
    <p role="status">{status}</p>
  </form>;
}

Native change events and read-only entry

The ordinary value/onChange convention receives the canonical code after native paste.

Keyboard

  • Paste formatted text into the real input.
  • Select a text range and use Backspace to edit it.
  • Read-only entry keeps its value when paste is attempted.

States covered

  • Canonical paste
  • Native change feedback
  • Complete code
  • Read only

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-otp-native-change.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import {useState} from 'react';
import {OTPInput} from '@bld8/ui';
import '@bld8/ui/styles.css';
export default function NativeCodeExample(){
  const [code,setCode]=useState(''),[lastEdit,setLastEdit]=useState(''),[complete,setComplete]=useState('');
  return <div>
    <OTPInput label="Native change example code" length={6} value={code}
      onChange={event=>{setCode(event.currentTarget.value);setLastEdit(event.currentTarget.value);}} onComplete={setComplete}/>
    <p role="status">Canonical edit: {lastEdit}</p><p>Last complete code: {complete}</p>
    <OTPInput label="Read only example code" length={4} value="1234" readOnly/>
  </div>;
}

One field for the whole code

Native paste, autofill, selection and deletion, with optional decorative progress slots.

Keyboard

  • Type or paste into the single labelled input.
  • Arrow keys, selection and Backspace use native text editing.
  • Submit focuses the input when the code is incomplete.

States covered

  • Empty
  • Partial
  • Complete format
  • Validation error

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-otp-code.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {useRef,useState} from 'react';
import {Button,OTPInput} from '@bld8/ui';
export default function CodeExample(){
  const [code,setCode]=useState(''),[error,setError]=useState(''),[status,setStatus]=useState('');
  const input=useRef<HTMLInputElement>(null);
  return <form noValidate onSubmit={event=>{
    event.preventDefault();
    if(code.length!==6){setError('Enter all six digits.');input.current?.focus();return;}
    setError('');setStatus('Code format is ready. This example does not verify a code.');
  }}>
    <OTPInput label="Example verification code" name="verificationCode" length={6} value={code}
      onValueChange={next=>{setCode(next);setError('');setStatus('');}} inputRef={input} required showSlots
      hint="Paste a six digit code or type it in this single field." error={error}/>
    <Button type="submit">Check example code</Button><p role="status">{status}</p>
  </form>;
}

Quick reference

React / TypeScript
<OTPInput label="Verification code" name="code" length={6}
  value={code} onValueChange={setCode} autoComplete="one-time-code" />

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

One real native text input preserves selection, paste, autofill, mobile keyboards, form submission and accessible labelling. Optional decorative progress slots do not create separate inputs. Digits are the default; alphanumeric mode accepts ASCII letters and numbers. Length is bounded from 1 to 12. Controlled/uncontrolled state, reset, input ref, hint/error and onComplete are supported. Completion only reports input; this control does not send or verify codes.

OTPInput

OTPInput public properties
PropTypeDefault
labelRequiredstring—
defaultValuestring | undefined''
digitsOnlyboolean | undefinedtrue
errorstring | undefined—
hintstring | undefined—
inputRefRef<HTMLInputElement> | undefined—
lengthnumber | undefined6
onComplete((value: string) => void) | undefined

Called when a user edit produces a complete code; this does not verify it.

—
onValueChange((value: string) => void) | undefined—
showSlotsboolean | undefined

Optional decorative progress slots; editing always stays in one native input.

false
valuestring | undefined—
Forwarded React / HTML props 305
OTPInput native public properties
PropTypeDefault
aboutstring | undefined—
acceptstring | undefined—
accessKeystring | undefined—
altstring | undefined—
aria-activedescendantstring | undefined

Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application.

—
aria-atomicBooleanish | undefined

Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute.

—
aria-autocomplete"none" | "list" | "inline" | "both" | undefined

Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made.

—
aria-braillelabelstring | undefined

Defines a string value that labels the current element, which is intended to be converted into Braille.

—
aria-brailleroledescriptionstring | undefined

Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.

—
aria-busyBooleanish | undefined—
aria-checkedboolean | "true" | "false" | "mixed" | undefined

Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.

—
aria-colcountnumber | undefined

Defines the total number of columns in a table, grid, or treegrid.

—
aria-colindexnumber | undefined

Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.

—
aria-colindextextstring | undefined

Defines a human readable text alternative of aria-colindex.

—
aria-colspannumber | undefined

Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.

—
aria-controlsstring | undefined

Identifies the element (or elements) whose contents or presence are controlled by the current element.

—
aria-currentboolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined

Indicates the element that represents the current item within a container or set of related elements.

—
aria-describedbystring | undefined

Identifies the element (or elements) that describes the object.

—
aria-descriptionstring | undefined

Defines a string value that describes or annotates the current element.

—
aria-detailsstring | undefined

Identifies the element that provides a detailed, extended description for the object.

—
aria-disabledBooleanish | undefined

Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.

—
aria-dropeffect"none" | "link" | "copy" | "execute" | "move" | "popup" | undefined

Indicates what functions can be performed when a dragged object is released on the drop target.

—
aria-errormessagestring | undefined

Identifies the element that provides an error message for the object.

—
aria-expandedBooleanish | undefined

Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed.

—
aria-flowtostring | undefined

Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order.

—
aria-grabbedBooleanish | undefined

Indicates an element's "grabbed" state in a drag-and-drop operation.

—
aria-haspopupboolean | "true" | "false" | "dialog" | "grid" | "listbox" | "menu" | "tree" | undefined

Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element.

—
aria-hiddenBooleanish | undefined

Indicates whether the element is exposed to an accessibility API.

—
aria-invalidboolean | "true" | "false" | "grammar" | "spelling" | undefined

Indicates the entered value does not conform to the format expected by the application.

—
aria-keyshortcutsstring | undefined

Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element.

—
aria-labelstring | undefined

Defines a string value that labels the current element.

—
aria-labelledbystring | undefined

Identifies the element (or elements) that labels the current element.

—
aria-levelnumber | undefined

Defines the hierarchical level of an element within a structure.

—
aria-live"off" | "assertive" | "polite" | undefined

Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region.

—
aria-modalBooleanish | undefined

Indicates whether an element is modal when displayed.

—
aria-multilineBooleanish | undefined

Indicates whether a text box accepts multiple lines of input or only a single line.

—
aria-multiselectableBooleanish | undefined

Indicates that the user may select more than one item from the current selectable descendants.

—
aria-orientation"horizontal" | "vertical" | undefined

Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous.

—
aria-ownsstring | undefined

Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship.

—
aria-placeholderstring | undefined

Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format.

—
aria-posinsetnumber | undefined

Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.

—
aria-pressedboolean | "true" | "false" | "mixed" | undefined

Indicates the current "pressed" state of toggle buttons.

—
aria-readonlyBooleanish | undefined

Indicates that the element is not editable, but is otherwise operable.

—
aria-relevant"text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined

Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.

—
aria-requiredBooleanish | undefined

Indicates that user input is required on the element before a form may be submitted.

—
aria-roledescriptionstring | undefined

Defines a human-readable, author-localized description for the role of an element.

—
aria-rowcountnumber | undefined

Defines the total number of rows in a table, grid, or treegrid.

—
aria-rowindexnumber | undefined

Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.

—
aria-rowindextextstring | undefined

Defines a human readable text alternative of aria-rowindex.

—
aria-rowspannumber | undefined

Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.

—
aria-selectedBooleanish | undefined

Indicates the current "selected" state of various widgets.

—
aria-setsizenumber | undefined

Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM.

—
aria-sort"none" | "ascending" | "descending" | "other" | undefined

Indicates if items in a table or grid are sorted in ascending or descending order.

—
aria-valuemaxnumber | undefined

Defines the maximum allowed value for a range widget.

—
aria-valueminnumber | undefined

Defines the minimum allowed value for a range widget.

—
aria-valuenownumber | undefined

Defines the current value for a range widget.

—
aria-valuetextstring | undefined

Defines the human readable text alternative of aria-valuenow for a range widget.

—
autoCapitalize"off" | "none" | "on" | "sentences" | "words" | "characters" | (string & {}) | undefined—
autoCompleteHTMLInputAutoCompleteAttribute | undefined'one-time-code'
autoCorrectstring | undefined—
autoFocusboolean | undefined—
autoSavestring | undefined—
captureboolean | "user" | "environment" | undefined—
checkedboolean | undefined—
childrenReactNode—
classNamestring | undefined—
colorstring | undefined—
contentstring | undefined—
contentEditableBooleanish | "inherit" | "plaintext-only" | undefined—
contextMenustring | undefined—
dangerouslySetInnerHTML{ __html: string | TrustedHTML; } | undefined—
datatypestring | undefined—
defaultCheckedboolean | undefined—
dirstring | undefined—
disabledboolean | undefined—
draggableBooleanish | undefined—
enterKeyHint"enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined—
exportpartsstring | undefined—
formstring | undefined—
formActionstring | ((formData: FormData) => void | Promise<void>) | undefined—
formEncTypestring | undefined—
formMethodstring | undefined—
formNoValidateboolean | undefined—
formTargetstring | undefined—
heightstring | number | undefined—
hiddenboolean | undefined—
idstring | undefined—
inertboolean | undefined—
inlistany—
inputMode"none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined

Hints at the type of data that might be entered by the user while editing the element or its contents

—
isstring | undefined

Specify that a standard HTML element should behave like a defined custom built-in element

—
itemIDstring | undefined—
itemPropstring | undefined—
itemRefstring | undefined—
itemScopeboolean | undefined—
itemTypestring | undefined—
keyKey | null | undefined—
langstring | undefined—
liststring | undefined—
maxstring | number | undefined—
minstring | number | undefined—
minLengthnumber | undefined—
multipleboolean | undefined—
namestring | undefined—
noncestring | undefined—
onAbortReactEventHandler<HTMLInputElement> | undefined—
onAbortCaptureReactEventHandler<HTMLInputElement> | undefined—
onAnimationEndAnimationEventHandler<HTMLInputElement> | undefined—
onAnimationEndCaptureAnimationEventHandler<HTMLInputElement> | undefined—
onAnimationIterationAnimationEventHandler<HTMLInputElement> | undefined—
onAnimationIterationCaptureAnimationEventHandler<HTMLInputElement> | undefined—
onAnimationStartAnimationEventHandler<HTMLInputElement> | undefined—
onAnimationStartCaptureAnimationEventHandler<HTMLInputElement> | undefined—
onAuxClickMouseEventHandler<HTMLInputElement> | undefined—
onAuxClickCaptureMouseEventHandler<HTMLInputElement> | undefined—
onBeforeInputInputEventHandler<HTMLInputElement> | undefined—
onBeforeInputCaptureInputEventHandler<HTMLInputElement> | undefined—
onBeforeToggleToggleEventHandler<HTMLInputElement> | undefined—
onBlurFocusEventHandler<HTMLInputElement> | undefined—
onBlurCaptureFocusEventHandler<HTMLInputElement> | undefined—
onCanPlayReactEventHandler<HTMLInputElement> | undefined—
onCanPlayCaptureReactEventHandler<HTMLInputElement> | undefined—
onCanPlayThroughReactEventHandler<HTMLInputElement> | undefined—
onCanPlayThroughCaptureReactEventHandler<HTMLInputElement> | undefined—
onChangeChangeEventHandler<HTMLInputElement, HTMLInputElement> | undefined—
onChangeCaptureChangeEventHandler<HTMLInputElement, Element> | undefined—
onClickMouseEventHandler<HTMLInputElement> | undefined—
onClickCaptureMouseEventHandler<HTMLInputElement> | undefined—
onCompositionEndCompositionEventHandler<HTMLInputElement> | undefined—
onCompositionEndCaptureCompositionEventHandler<HTMLInputElement> | undefined—
onCompositionStartCompositionEventHandler<HTMLInputElement> | undefined—
onCompositionStartCaptureCompositionEventHandler<HTMLInputElement> | undefined—
onCompositionUpdateCompositionEventHandler<HTMLInputElement> | undefined—
onCompositionUpdateCaptureCompositionEventHandler<HTMLInputElement> | undefined—
onContextMenuMouseEventHandler<HTMLInputElement> | undefined—
onContextMenuCaptureMouseEventHandler<HTMLInputElement> | undefined—
onCopyClipboardEventHandler<HTMLInputElement> | undefined—
onCopyCaptureClipboardEventHandler<HTMLInputElement> | undefined—
onCutClipboardEventHandler<HTMLInputElement> | undefined—
onCutCaptureClipboardEventHandler<HTMLInputElement> | undefined—
onDoubleClickMouseEventHandler<HTMLInputElement> | undefined—
onDoubleClickCaptureMouseEventHandler<HTMLInputElement> | undefined—
onDragDragEventHandler<HTMLInputElement> | undefined—
onDragCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragEndDragEventHandler<HTMLInputElement> | undefined—
onDragEndCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragEnterDragEventHandler<HTMLInputElement> | undefined—
onDragEnterCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragExitDragEventHandler<HTMLInputElement> | undefined—
onDragExitCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragLeaveDragEventHandler<HTMLInputElement> | undefined—
onDragLeaveCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragOverDragEventHandler<HTMLInputElement> | undefined—
onDragOverCaptureDragEventHandler<HTMLInputElement> | undefined—
onDragStartDragEventHandler<HTMLInputElement> | undefined—
onDragStartCaptureDragEventHandler<HTMLInputElement> | undefined—
onDropDragEventHandler<HTMLInputElement> | undefined—
onDropCaptureDragEventHandler<HTMLInputElement> | undefined—
onDurationChangeReactEventHandler<HTMLInputElement> | undefined—
onDurationChangeCaptureReactEventHandler<HTMLInputElement> | undefined—
onEmptiedReactEventHandler<HTMLInputElement> | undefined—
onEmptiedCaptureReactEventHandler<HTMLInputElement> | undefined—
onEncryptedReactEventHandler<HTMLInputElement> | undefined—
onEncryptedCaptureReactEventHandler<HTMLInputElement> | undefined—
onEndedReactEventHandler<HTMLInputElement> | undefined—
onEndedCaptureReactEventHandler<HTMLInputElement> | undefined—
onErrorReactEventHandler<HTMLInputElement> | undefined—
onErrorCaptureReactEventHandler<HTMLInputElement> | undefined—
onFocusFocusEventHandler<HTMLInputElement> | undefined—
onFocusCaptureFocusEventHandler<HTMLInputElement> | undefined—
onGotPointerCapturePointerEventHandler<HTMLInputElement> | undefined—
onGotPointerCaptureCapturePointerEventHandler<HTMLInputElement> | undefined—
onInputInputEventHandler<HTMLInputElement> | undefined—
onInputCaptureInputEventHandler<HTMLInputElement> | undefined—
onInvalidReactEventHandler<HTMLInputElement> | undefined—
onInvalidCaptureReactEventHandler<HTMLInputElement> | undefined—
onKeyDownKeyboardEventHandler<HTMLInputElement> | undefined—
onKeyDownCaptureKeyboardEventHandler<HTMLInputElement> | undefined—
onKeyPressKeyboardEventHandler<HTMLInputElement> | undefined—
onKeyPressCaptureKeyboardEventHandler<HTMLInputElement> | undefined—
onKeyUpKeyboardEventHandler<HTMLInputElement> | undefined—
onKeyUpCaptureKeyboardEventHandler<HTMLInputElement> | undefined—
onLoadReactEventHandler<HTMLInputElement> | undefined—
onLoadCaptureReactEventHandler<HTMLInputElement> | undefined—
onLoadedDataReactEventHandler<HTMLInputElement> | undefined—
onLoadedDataCaptureReactEventHandler<HTMLInputElement> | undefined—
onLoadedMetadataReactEventHandler<HTMLInputElement> | undefined—
onLoadedMetadataCaptureReactEventHandler<HTMLInputElement> | undefined—
onLoadStartReactEventHandler<HTMLInputElement> | undefined—
onLoadStartCaptureReactEventHandler<HTMLInputElement> | undefined—
onLostPointerCapturePointerEventHandler<HTMLInputElement> | undefined—
onLostPointerCaptureCapturePointerEventHandler<HTMLInputElement> | undefined—
onMouseDownMouseEventHandler<HTMLInputElement> | undefined—
onMouseDownCaptureMouseEventHandler<HTMLInputElement> | undefined—
onMouseEnterMouseEventHandler<HTMLInputElement> | undefined—
onMouseLeaveMouseEventHandler<HTMLInputElement> | undefined—
onMouseMoveMouseEventHandler<HTMLInputElement> | undefined—
onMouseMoveCaptureMouseEventHandler<HTMLInputElement> | undefined—
onMouseOutMouseEventHandler<HTMLInputElement> | undefined—
onMouseOutCaptureMouseEventHandler<HTMLInputElement> | undefined—
onMouseOverMouseEventHandler<HTMLInputElement> | undefined—
onMouseOverCaptureMouseEventHandler<HTMLInputElement> | undefined—
onMouseUpMouseEventHandler<HTMLInputElement> | undefined—
onMouseUpCaptureMouseEventHandler<HTMLInputElement> | undefined—
onPasteClipboardEventHandler<HTMLInputElement> | undefined—
onPasteCaptureClipboardEventHandler<HTMLInputElement> | undefined—
onPauseReactEventHandler<HTMLInputElement> | undefined—
onPauseCaptureReactEventHandler<HTMLInputElement> | undefined—
onPlayReactEventHandler<HTMLInputElement> | undefined—
onPlayCaptureReactEventHandler<HTMLInputElement> | undefined—
onPlayingReactEventHandler<HTMLInputElement> | undefined—
onPlayingCaptureReactEventHandler<HTMLInputElement> | undefined—
onPointerCancelPointerEventHandler<HTMLInputElement> | undefined—
onPointerCancelCapturePointerEventHandler<HTMLInputElement> | undefined—
onPointerDownPointerEventHandler<HTMLInputElement> | undefined—
onPointerDownCapturePointerEventHandler<HTMLInputElement> | undefined—
onPointerEnterPointerEventHandler<HTMLInputElement> | undefined—
onPointerLeavePointerEventHandler<HTMLInputElement> | undefined—
onPointerMovePointerEventHandler<HTMLInputElement> | undefined—
onPointerMoveCapturePointerEventHandler<HTMLInputElement> | undefined—
onPointerOutPointerEventHandler<HTMLInputElement> | undefined—
onPointerOutCapturePointerEventHandler<HTMLInputElement> | undefined—
onPointerOverPointerEventHandler<HTMLInputElement> | undefined—
onPointerOverCapturePointerEventHandler<HTMLInputElement> | undefined—
onPointerUpPointerEventHandler<HTMLInputElement> | undefined—
onPointerUpCapturePointerEventHandler<HTMLInputElement> | undefined—
onProgressReactEventHandler<HTMLInputElement> | undefined—
onProgressCaptureReactEventHandler<HTMLInputElement> | undefined—
onRateChangeReactEventHandler<HTMLInputElement> | undefined—
onRateChangeCaptureReactEventHandler<HTMLInputElement> | undefined—
onResetReactEventHandler<HTMLInputElement> | undefined—
onResetCaptureReactEventHandler<HTMLInputElement> | undefined—
onScrollUIEventHandler<HTMLInputElement> | undefined—
onScrollCaptureUIEventHandler<HTMLInputElement> | undefined—
onScrollEndUIEventHandler<HTMLInputElement> | undefined—
onScrollEndCaptureUIEventHandler<HTMLInputElement> | undefined—
onSeekedReactEventHandler<HTMLInputElement> | undefined—
onSeekedCaptureReactEventHandler<HTMLInputElement> | undefined—
onSeekingReactEventHandler<HTMLInputElement> | undefined—
onSeekingCaptureReactEventHandler<HTMLInputElement> | undefined—
onSelectReactEventHandler<HTMLInputElement> | undefined—
onSelectCaptureReactEventHandler<HTMLInputElement> | undefined—
onStalledReactEventHandler<HTMLInputElement> | undefined—
onStalledCaptureReactEventHandler<HTMLInputElement> | undefined—
onSubmitSubmitEventHandler<HTMLInputElement> | undefined—
onSubmitCaptureSubmitEventHandler<HTMLInputElement> | undefined—
onSuspendReactEventHandler<HTMLInputElement> | undefined—
onSuspendCaptureReactEventHandler<HTMLInputElement> | undefined—
onTimeUpdateReactEventHandler<HTMLInputElement> | undefined—
onTimeUpdateCaptureReactEventHandler<HTMLInputElement> | undefined—
onToggleToggleEventHandler<HTMLInputElement> | undefined—
onTouchCancelTouchEventHandler<HTMLInputElement> | undefined—
onTouchCancelCaptureTouchEventHandler<HTMLInputElement> | undefined—
onTouchEndTouchEventHandler<HTMLInputElement> | undefined—
onTouchEndCaptureTouchEventHandler<HTMLInputElement> | undefined—
onTouchMoveTouchEventHandler<HTMLInputElement> | undefined—
onTouchMoveCaptureTouchEventHandler<HTMLInputElement> | undefined—
onTouchStartTouchEventHandler<HTMLInputElement> | undefined—
onTouchStartCaptureTouchEventHandler<HTMLInputElement> | undefined—
onTransitionCancelTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionCancelCaptureTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionEndTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionEndCaptureTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionRunTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionRunCaptureTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionStartTransitionEventHandler<HTMLInputElement> | undefined—
onTransitionStartCaptureTransitionEventHandler<HTMLInputElement> | undefined—
onVolumeChangeReactEventHandler<HTMLInputElement> | undefined—
onVolumeChangeCaptureReactEventHandler<HTMLInputElement> | undefined—
onWaitingReactEventHandler<HTMLInputElement> | undefined—
onWaitingCaptureReactEventHandler<HTMLInputElement> | undefined—
onWheelWheelEventHandler<HTMLInputElement> | undefined—
onWheelCaptureWheelEventHandler<HTMLInputElement> | undefined—
partstring | undefined—
patternstring | undefined—
placeholderstring | undefined—
popover"" | "auto" | "manual" | "hint" | undefined—
popoverTargetstring | undefined—
popoverTargetAction"toggle" | "show" | "hide" | undefined—
prefixstring | undefined—
propertystring | undefined—
radioGroupstring | undefined—
readOnlyboolean | undefined—
refRef<HTMLInputElement> | undefined

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).

—
relstring | undefined—
requiredboolean | undefined—
resourcestring | undefined—
resultsnumber | undefined—
revstring | undefined—
roleAriaRole | undefined—
securitystring | undefined—
slotstring | undefined—
spellCheckBooleanish | undefined—
srcstring | undefined—
stepstring | number | undefined—
styleCSSProperties | undefined—
suppressContentEditableWarningboolean | undefined—
suppressHydrationWarningboolean | undefined—
tabIndexnumber | undefined—
titlestring | undefined—
translate"yes" | "no" | undefined—
typeofstring | undefined—
unselectable"off" | "on" | undefined—
vocabstring | undefined—
widthstring | number | undefined—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.

Related controls

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.