Inputs
TextField
Text fields give people a way to enter and edit text. They're used in forms, modal dialogs, tables, and other surfaces where text input is required. A single BitTextField renders either an input or a textarea, carries a label in any of the four positions around it, a visible or screen-reader-only description, a character counter and a message saying why the value was rejected, exposes every part of its chrome to templates and to the Styles and Classes parameters, wires its own labels and descriptions to the input through the aria attributes, and plugs into an EditForm the same way the built-in Blazor inputs do.
Customization
Defaults for every field of a subtree through BitParams, the background, border and accent colors, external icons, sizes, Style & Class with the CSS variables, and right-to-left fields.
Cascading parameters
Three groups of parameters are deliberately not on the params object, because sharing them between fields would be wrong rather than merely unused: what identifies a field and carries its value (Value, DefaultValue, Name, DisplayName), the event callbacks, and what says something about the value in one field alone (Invalid, ErrorMessage, GhostText, Loading, AutoFocus). InputHtmlAttributes and NoValidate stay out too, as they do for every input: the first is a dictionary the field writes into, and the second is read before a cascade is applied.
Background
Border
Accent
External Icons
Size
Style & Class
For the look rather than the layout there are the public --bit-TextField-* custom properties listed in the CSS variables table. They are read off the element and inherited, so the same name set on
:root re-skins every field of the app, set on an ancestor re-skins the fields inside it, and set on
the Style of one field re-skins that one and any field nested in it - without a selector, a scoped
stylesheet or a ::deep anywhere. Anything left unset keeps the value the theme gives it, so a single
property can be swapped without restating the rest. They restyle the default, not a choice: an explicit
Accent, Background, Border or Size wins over the variables for what it sets.
RTL
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.