Appearance style for the field.
Wether outline
(default), legacy
, fill
or standard
.
Whether the control is disabled.
Error text to be shown underneath the form field control.
Hint text to be shown underneath the form field control.
The floating label for a field.
Executed when autocomplete field is focused.
Executed with an input value from user.
The placeholder text.
Autocomplete suggestions.
Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will match the width of its host.
Wether value of the field should be emitted when user is blurred out of the control.
Value of the input.
<drayman-number-field />
Number field powered by Angular Material library.
Example of usage
export const component: DraymanComponent = async ({ forceUpdate }) => { let celsius; let fahrenheit; let typing = false; return () => { return ( <div> <drayman-number-field value={fahrenheit} label="Temperature in Fahrenheit (°F)" onValueChangeStart={async () => { typing = true; await forceUpdate(); }} onValueChange={async ({ value }) => { typing = false; fahrenheit = value; celsius = (value - 32) / 1.8; await forceUpdate(); }} /> <div>{celsius && `${fahrenheit}°F = ${Math.round(celsius * 100) / 100}°C`}</div> <div>{typing ? `You are typing!` : `You aren't typing!`}</div> </div> ) }; }