Expand description
Text and number inputs: a bg.input field with a 1 px border that turns
accent on focus, an error state that keeps the user’s text, a search
variant, and numbers with the unit inside the field.
Structs§
- Input
Output - What an input drew.
- Number
Input - A number field with its unit inside the field.
- Number
Output - Text
Input - A single-line text field.
Functions§
- evaluate
- Evaluate what a user typed into a number field whose unit is
unit(“” for none):+ - * /, parentheses, and unit names, which multiply the value before them into the field’s unit, so1/2 inin a millimetre field is 12.7 and2 in + 5is 55.8. This is the gallery’s stand-in: the form wiring (rollout step 3) hands the text to the engine’s expression evaluator. - format_
number - A value as a field shows it: up to six decimals, no trailing zeros.
- number_
input number_input(&mut depth).unit("mm").label("Depth").show(ui).- search_
input - A search field: a leading magnifier, and a clear × when not empty.
- text_
input - A text field.
text_input(&mut name).placeholder("Name").show(ui).