Input
Click me!
Interfaces
InputProps
Defined in: input.types.ts:8
The Input component properties.
Extends
unknown
<JSX.InputHTMLAttributes
<HTMLInputElement
>>
Properties
disabled?
optional
disabled:boolean
Defined in: input.types.ts:61
Whether the input is disabled.
Default
false;
forceOption?
optional
forceOption:boolean
Defined in: input.types.ts:38
If true, validation will fail if the input value is not in the list of options.
Default
false;
icon?
optional
icon:string
Defined in: input.types.ts:16
An optional icon to render as part of the label.
label
label:
string
Defined in: input.types.ts:12
The input label.
onChange()?
optional
onChange: (value
,event
) =>void
Defined in: input.types.ts:67
Called when the input value changes.
Parameters
value
string
The input value.
event
Event
& object
The input event.
Returns
void
onInput()?
optional
onInput: (value
,event
) =>void
Defined in: input.types.ts:79
Called when a character is being inserted or removed.
Parameters
value
string
The input value.
event
Event
& object
The input event.
Returns
void
options?
optional
options:SelectOption
[]
Defined in: input.types.ts:33
An optional list of options for the input. Will be rendered into a
required?
optional
required:boolean
Defined in: input.types.ts:56
Whether the input is required.
Default
false;
size?
optional
size:ControlSize
Defined in: input.types.ts:43
The size of the input.
Default
undefined;
type?
optional
type:InputType
Defined in: input.types.ts:21
The type of the input.
Default
'text';
value?
optional
value:string
Defined in: input.types.ts:28
The input value. If not provided, the input will be uncontrolled and will manage its own state. If provided, the input will be controlled and will use this value as its current value.
Default
undefined;
variant?
optional
variant:string
Defined in: input.types.ts:51
The input variant.
Default
'contained';
Variables
Input
const
Input:Component
<InputProps
>
Defined in: input.component.tsx:12
A flexible input component.
Param
Returns
The input component.