Usage
import { __experimentalInputControl as InputControl } from '@wordpress/components'; import { useState } from 'react'; const Example = () => { const [ value, setValue ] = useState( '' ); return ( <InputControl value={ value } onChange={ ( nextValue ) => setValue( nextValue ?? '' ) } /> ); };
Props
disabled
-
Type: Boolean -
Required: No -
Default: false
isPressEnterToChange
-
Type: Boolean -
Required: No -
Default: false
hideLabelFromVision
-
Type: Boolean -
Required: No
label
-
Type: String -
Required: No
labelPosition
-
Type: String -
Required: No
onChange
-
Type: Function -
Required: Yes
prefix
-
Type: React.ReactNode -
Required: No
size
-
Type: String -
Required: No -
Default: default
suffix
-
Type: React.ReactNode -
Required: No
type
-
Type: String -
Required: No -
Default: “text”
value
-
Type: String -
Required: No