title: Blazor InputText: conditionally rendering an attribute
body: <p>Blazor vRC1</p>
  
  <p>I'm looking for a straightforward technique on how to conditionally render an attribute within an <code>&lt;InputText&gt;</code> (or any of the input components for that matter).  This used to be simple in MVC Razor, where you'd just write the conditional logic within the <code>@(...)</code> statement.  Now, writing <code>@(...)</code> has different meaning in the Razor syntax.</p>
  
  <p>For example, I'd like to conditionally output the <code>autofocus</code> HTML attribute for <code>InputText</code>.</p>
  
  <pre><code>&lt;InputText 
   @bind-Value="@TextProperty"
   @(MyModel.isAutoFocus ? "autofocus" : "") &lt;-  This is invalid razor syntax!
  /&gt;
  </code></pre>