Input

A single-line text input for HTML forms

The component also passes through React.InputHTMLAttributes<HTMLInputElement> props, which are excluded here for brevity.

<Input>

import { Input } from '@strum/react';
name
type
default
error
string
-
id*
Required
string
-
label*
Required
string
-
onChange
ChangeEventHandler<HTMLInputElement>
-
ref
Ref<HTMLInputElement>
-
size
"large" | "small" | "medium"
medium
state
"error"
-
value
string | number | readonly string[]
-

Disabled state
Link to this heading

Controlled input
Link to this heading

To control your input with React, simply include a value string prop and a onChange function prop.