Check out example codes for "disabled input css". It will help you in understanding the concepts better.

Code Example 1

input[type="text"]:disabled {
	background-color: #dddddd;
}

Code Example 2

<input type="text" name="username" value="admin" >

<style type="text/css">
input[name=username] {
    pointer-events: none;
 }
</style>

Code Example 3

<form 
    action="/action_page.php">

  <label for="fname">First name:</label>
  <input type="text" id="fname" 
    name="fname"><br><br>
  <label for="lname">Last name:</label>
  
    <input type="text" id="lname" name="lname" disabled><br><br>
  
    <input type="submit" value="Submit">

    </form>

Learn ReactJs, React Native from akashmittal.com