title: How to set the inputType for a TextField in Jetpack Compose
body: <p>I'd like to restrict what the user can type in a TextField in Jetpack Compose. How do I do that?</p>
  <p>The equivalent in xml is <code>inputType</code>:</p>
  <pre><code>&lt;EditText
      android:layout_width=&quot;wrap_content&quot;
      android:layout_height=&quot;wrap_content&quot;
      android:inputType=&quot;number&quot;
      android:hint=&quot;Only numbers please!&quot; /&gt;
  </code></pre>