--- license: MIT name: syncfusion-blazor-toolkit-inputs description: > Implement Syncfusion Blazor Toolkit input components — TextBox, TextArea, NumericTextBox, Uploader, CheckBox, RadioButton, Switch. USE FOR: text, numeric, percentage, and currency inputs; multi-line text; Auto / AJAX file uploads with multi-file and validation; boolean and single-selection controls with two-way binding; WCAG and keyboard accessibility; integration with EditForm and EditContext. REQUIRES interactive render mode for `SfUploader` only; other inputs (TextBox, TextArea, NumericTextBox, CheckBox, RadioButton, Switch) work in Static SSR as well as interactive modes. DO NOT USE FOR: button controls (use syncfusion-blazor-toolkit-buttons), rich text editing (use SfRichTextEditor — not in this skill), date or time inputs (use syncfusion-blazor-toolkit-calendars). compatibility: ".NET 8+, render-modes: Static SSR (text/checkbox/numeric/Switch); Server, WebAssembly, Auto (all)" metadata: author: "Syncfusion Inc" version: "1.0.0" --- # Syncfusion Blazor Toolkit - Input Components > ⚙️ **Render mode:** `SfTextBox`, `SfTextArea`, `SfNumericTextBox`, `SfCheckBox`, `SfRadioButton`, `SfSwitch` work in all modes. **`SfUploader`** and **`InputFile` are NOT usable in Static SSR** — they require interactive render mode (Server, WebAssembly, or Auto @ .NET 8+). Read `AGENTS.md` before wiring file uploads. ## Core Rules 1. **Use `@bind-Value` for two-way binding**; use `ValueChanged` only when you need to inspect without binding. Never both. 2. **`TValue` and `TChecked` generic params must match the bound C# type.** `SfNumericTextBox` requires `T : struct, IFormattable` — `T=string` compiles and crashes at runtime. 3. **`SfUploader` and `` are NOT usable in Static SSR** — the file-system path / JavaScript interop is unavailable. 4. **`SfUploader` requires a `SaveUrl`** (an HTTP endpoint); never point it at a static path on disk. 5. **`SfUploader` has a SignalR message-size limit (Server mode)** — call `OpenReadStream(maxAllowedSize)` to lift it for large uploads. 6. **`SfCheckBox`**, **`SfRadioButton`**, and **`SfSwitch` use `TChecked` not `T`** in the generic parameter — be careful when copy-pasting between CheckBox and Switch. 7. **`SfNumericTextBox` accepts `Format` as a string** — `Format="C2"`, `Format="P"`, `Format="N0"`. The value is `CultureInfo.CurrentCulture` aware. **For currency, prefer a literal culture-locked pattern (e.g. `Format="$#,##0.00"`) to avoid locale-dependent UX.** 8. **Component parameter required** — use `[EditorRequired]` attribute on your `[Parameter]` declaration (compile-time check for component authors). 9. **Form-field required** — use `[Required]` (and other `DataAnnotations` attributes) on a model property, then include `` inside ``. Without it, `[Required]` is silently ignored. 10. **`ID` and `Name` come from `HtmlAttributes`** if not explicitly supplied — don't rely on them being filled in. 11. **`ValueChange` fires before binding commits.** Use `@bind-Value:after` for post-commit validation or side effects. ## Don'ts | Anti-pattern | Symptom | Fix | |---|---|---| | `SfCheckBox TChecked="string"` | Compile succeeds; runtime throws "Cannot convert null to bool" on first render | Use `TChecked="bool"` (or `int?` for 3-state) | | `SfUploader` `AutoUpload="true"` on a static URL path | 404 / 405 from web server; upload "completes" but file is lost in client browser | Always POST to a controller endpoint that handles `IFormFile` and returns 200 | | `` / `` in a Static SSR page | Component never receives a file (`IBrowserFile` is null); prerender is always empty | Move to a `Server | WebAssembly | Auto` page or `@rendermode InteractiveServer`-only page | | `SfNumericTextBox T="decimal" Format="N2"` for currency | Field shows `1,234.56` for en-US but `1.234,56` for de-DE — inconsistent UX | Use `Format="C2"` so the currency formatter takes culture into account; **or lock the format** (`Format="$#,##0.00"`) for culture-stable display | | `` | Compile error or ignored — `Disabled` is a one-way attribute | Use `` and toggle `_busy` manually | | Two `SfNumericTextBox` of different `T` in one `EditForm` row | Validation can bind to the wrong field; `@bind-Value` resolves to the first match | Set explicit `TValue` per input or split rows | | Missing `` in `` | All `[Required]`/`[StringLength]` rules silently ignored; form submits invalid data | Always include `` as the first child of `` | | Stripping `class="e-input"` from the rendered `` | Numeric arrows / clear-button vanish; keyboard users lose step controls | Scope styling to parent (`
` / `