BetaPublic beta — Read the release notes
Documentation

Input

Text input and textarea with validation states and Field integration.

Package
@solidiom/input
Version
0.0.1-next.0
Status
stable

Generated from the package's public source.

API

InputRootPropsinterface

Props

class?
string
defaultValue?
string — Default value (uncontrolled).
disabled?
boolean
id?
string — Element id for label association.
invalid?
boolean
name?
string — Form field name.
onBlur?
EventHandler<HTMLInputElement, FocusEvent> — Native blur event handler.
onFocus?
EventHandler<HTMLInputElement, FocusEvent> — Native focus event handler.
onInput?
EventHandler<HTMLInputElement, InputEvent> — Native input event handler.
onValueChange?
(value: string) => void — Called when the value changes.
placeholder?
string — Input placeholder text.
readOnly?
boolean
required?
boolean
style?
string | CSSProperties
type?
"number" | "text" | "email" | "password" | "search" | "tel" | "url" — HTML input type.
value?
string — Current input value (controlled).

View source

Rootcomponent

                        Root(props: InputRootProps): Element
                      

Props

class?
string
defaultValue?
string — Default value (uncontrolled).
disabled?
boolean
id?
string — Element id for label association.
invalid?
boolean
name?
string — Form field name.
onBlur?
EventHandler<HTMLInputElement, FocusEvent> — Native blur event handler.
onFocus?
EventHandler<HTMLInputElement, FocusEvent> — Native focus event handler.
onInput?
EventHandler<HTMLInputElement, InputEvent> — Native input event handler.
onValueChange?
(value: string) => void — Called when the value changes.
placeholder?
string — Input placeholder text.
readOnly?
boolean
required?
boolean
style?
string | CSSProperties
type?
"number" | "text" | "email" | "password" | "search" | "tel" | "url" — HTML input type.
value?
string — Current input value (controlled).

View source

Textareacomponent

                        Textarea(props: TextareaProps): Element
                      

Props

class?
string
defaultValue?
string — Default value (uncontrolled).
disabled?
boolean
id?
string — Element id for label association.
invalid?
boolean
name?
string — Form field name.
onBlur?
EventHandler<HTMLTextAreaElement, FocusEvent> — Native blur event handler.
onFocus?
EventHandler<HTMLTextAreaElement, FocusEvent> — Native focus event handler.
onInput?
EventHandler<HTMLTextAreaElement, InputEvent> — Native input event handler.
onValueChange?
(value: string) => void — Called when the value changes.
placeholder?
string — Textarea placeholder text.
readOnly?
boolean
required?
boolean
rows?
number — Number of visible text rows.
style?
string | CSSProperties
value?
string — Current value (controlled).

View source

TextareaPropsinterface

Props

class?
string
defaultValue?
string — Default value (uncontrolled).
disabled?
boolean
id?
string — Element id for label association.
invalid?
boolean
name?
string — Form field name.
onBlur?
EventHandler<HTMLTextAreaElement, FocusEvent> — Native blur event handler.
onFocus?
EventHandler<HTMLTextAreaElement, FocusEvent> — Native focus event handler.
onInput?
EventHandler<HTMLTextAreaElement, InputEvent> — Native input event handler.
onValueChange?
(value: string) => void — Called when the value changes.
placeholder?
string — Textarea placeholder text.
readOnly?
boolean
required?
boolean
rows?
number — Number of visible text rows.
style?
string | CSSProperties
value?
string — Current value (controlled).

View source