Skip to content

Input

Surface for accepting user input
import { Input } from 'degen'
name
type
default
description
autoComplete
string
-
-
autoCorrect
string
-
-
autoFocus
boolean
-
-
defaultValue
string | number
-
-
description
ReactNode
-
-
disabled
boolean
-
-
error
ReactNode
-
-
hideLabel
boolean
-
-
id
string
-
-
inputMode
"email" | "text" | "none" | "tel" | "url" | "numeric" | "decimal" | "search"
-
-
label*
Required
ReactNode
-
-
labelSecondary
ReactNode
-
-
max
string | number
-
-
maxLength
number
-
-
min
string | number
-
-
name
string
-
-
placeholder
string
-
-
prefix
ReactNode
-
-
readOnly
boolean
-
-
ref
Ref<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 https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
required
boolean
-
-
spellCheck
Booleanish
-
-
step
string | number
-
-
suffix
ReactNode
-
-
tabIndex
number
-
-
textTransform
"capitalize" | "lowercase" | "uppercase"
-
-
type
"number" | "email" | "text" | "datetime-local"
text
-
units
string
-
-
value
string | number
-
-
width
ConditionalStyle<Values<{ '448px': string; '512px': string; '576px': string; '672px': string; '720px': string; '768px': string; '896px': string; '976px': string; '1024px': string; '1152px': string; '1280px': string; '1/4': string; '1/3': string; '1/2': string; ... 52 more ...; none: CSSVarFunction; }, { ...; }>>
-
-
onBlur
FocusEventHandler<HTMLInputElement>
-
-
onChange
(event: ChangeEvent<HTMLInputElement>) => void
-
-
onFocus
FocusEventHandler<HTMLInputElement>
-
-
onKeyDown
KeyboardEventHandler<HTMLInputElement>
-
-
uppercase
boolean
-
-