DOM elements

<input>

Use an input for short text or a supported native input type. For controlled text, initialize with a string and update from the DOM on change.

Formal Syntax & Structure

react syntaxreact
<input ... />

Working Example

Example Snippetreact
import {useState} from 'react';export default function App(){const [v,setV]=useState('');return <label>Tool<input value={v} onChange={e=>setV(e.target.value)}/></label>}
React Reference