Input
Single-line text input with controlled value, placeholder, label, description, native types, engineering input, and disabled state.
Usage Notes
- Use for name input, search boxes, email/password, and other single-line text.
- Use
type: "engineering"for values such as4.7k,2.2uF, or1e-3. - Not suitable for numeric range selection (use
slider). - Related components:
selectfor option selection,sliderfor numeric ranges. - Typically placed inside a
columnto compose forms. - Use
$valueandonchangefor state binding. - Numeric and engineering inputs render only the native input. Use
sliderfor range adjustment; SlexKit no longer adds custom decrement or increment buttons. onchangefires when the user edits the value.type: "number"still emits a string value. Convert withNumber($event)or usetype: "engineering"to read parsed results.- Use
invalidpluserrorfor validation feedback. Error text is linked througharia-describedby.
Label and unit
label renders as a clickable native label; unit renders as trailing text, suitable for voltage, resistance, frequency, etc.
namespace: "doc_input_label_unit",
layout: {
"input:voltage": {
label: "Voltage",
value: "3.3",
unit: "V",
description: "Supply rail"
}
}
}
Disabled state
namespace: "doc_input_disabled_diff",
layout: {
"row:diff": {
"input:enabled": {
value: "Editable",
placeholder: "Type here"
},
"input:disabled": {
value: "Disabled",
disabled: true
}
}
}
}
Engineering input
type: "engineering" uses a text input (not the native number type). Component state retains the raw string and additionally exposes parsed results:
namespace: "doc_input_engineering",
layout: {
"input:resistance": {
type: "engineering",
value: "4.7kΩ"
},
"stat:parsed": {
label: "Parsed value",
$value: "resistance.valid ? resistance.number : 'Invalid'",
$unit: "resistance.unit"
}
}
}Supports scientific notation and SI prefixes: p, n, u, µ, m, k, K, M, meg, G, T. Units are captured but not converted across physical dimensions.