Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
|
Raw History Blame Contribute Delete
1.19 kB

Form Text Input

<FormTextInput /> is a React component suited for rendering an <input /> field enhanced with Calypso-specific styling and validity indicators.

Usage

Render as you would an <input /> element. Any props passed not included in the props documentation below will be applied to the rendered <input /> element.

export default function MyForm() {
    return <FormTextInput isValid initialValue="Hello World!" />;
}

Props

isError

TypeBoolean
RequiredNo

Whether the input should be rendered with error styling.

isValid

TypeBoolean
RequiredNo

Whether the input should be rendered with valid (success) styling.

selectOnFocus

TypeBoolean
RequiredNo

Whether the value should be selected when the input is focused.

hasCoreStyles

TypeBoolean
RequiredNo

Whether the input should be styled like a @wordpress-components text input.