|
Download wp-calypso/client/components/forms/form-text-input/README.md from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/form-text-input/README.md
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/components/forms/form-text-input/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/components/forms/form-text-input/README.md
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
| Type | Boolean |
| Required | No |
Whether the input should be rendered with error styling.
isValid
| Type | Boolean |
| Required | No |
Whether the input should be rendered with valid (success) styling.
selectOnFocus
| Type | Boolean |
| Required | No |
Whether the value should be selected when the input is focused.
hasCoreStyles
| Type | Boolean |
| Required | No |
Whether the input should be styled like a @wordpress-components text input.