CheTextField

TextField コンポーネントです。

表示

基本

4 /1,000

<CheTextField
  value={value}
  placeholder="テキスト"
  onChange={(event) => setValue(event.currentTarget.value)}
/>

disabled

<CheTextField disabled />

invalid

<CheTextField invalid />

最大文字数指定

10 /1,000

<CheTextField maxLength={1000}>

Props

属性詳細デフォルト必須
idフォームの IDstring-No
valuestring-No (Controlled モードでのみ必須)
defaultValueUncontrolledモードでの初期値string-No
className追加 CSS クラスstring?undefinedNo
disabled入力を無効にするbooleanfalseNo
invalidエラー時booleanundefinedNo
placeholderプレースホルダーstring?undefinedNo
maxLength最大文字数number?undefinedNo
onChange値を変更し、フォーカスを外した後のハンドラーChangeEventHandler?-No (Controlled モードでのみ必須)
onInput入力中のハンドラーInputEventHandler?undefinedNo
onFocusフォーカス時のハンドラーFocusEventHandler?undefinedNo
onBlurフォーカスアウト時のハンドラーFocusEventHandler?undefinedNo