Widget Core Function
The input widget is the primary user input field. It will output (by default) an empty box/cell that requires user input for some calculations. Behaves similarly to a cell in Microsoft Excel.UI Experience
- Primary user input field
- Outputs an empty box/cell for user data entry
- Accepts numerical values, text, or formulas
Data Organization
- Behaves similarly to a cell in Microsoft Excel
- Can store and reference values throughout the template
Visual Presentation
Because the input widget is fairly simple and is only an interface for the user to input data, there is no specific section associated to the core functions in the widget. Any section used in the input widget is used in other widgets as well.Example Code
Parameters
| Key | Type | Default | Required | Description |
|---|---|---|---|---|
type | string | - | Yes | Must be “input” |
label | string | - | Yes | The name of widget |
symbol | string (KaTeX) | - | Yes | Symbol for the widget |
units | string | - | No | Units for the widget |
referenceId | string | - | Yes | Unique reference ID |
export | boolean | false | No | Export for load linking |
visibleIf | string | true | No | Visibility condition |
checks | array | [] | No | Validation checks |
defaultValue | string | - | No | Default value or formula |
description | string | - | No | User-facing description |
references | string | - | Yes | Code/standard reference |
authorNotes | string | - | No | Internal notes |
referenceImage | string | - | No | Supporting image |
Common Use Cases
Basic Numerical Input
Text Input
Conditional Visibility
Validation Checks
Input widgets can include validation checks to ensure data quality:Best Practices
- Use clear, descriptive labels
- Include appropriate units
- Set sensible default values
- Add validation checks for critical inputs
- Use visibility conditions to simplify the interface
- Include references to relevant standards
Examples from Current Calculators
| ReferenceId | Calculator |
|---|---|
alpha_v | EU Steel Column |