Skip to main content

JeTextfield | <je-textfield>

Properties

PropertyAttributeDescriptionTypeDefault
autoCapitalizeauto-capitalizePassed to native inputstring'off'
autoCompleteauto-completePassed to native inputstring'off'
autoCorrectauto-correctPassed to native input"off" | "on"'off'
autoFocusauto-focusPassed to native inputbooleanundefined
debouncedebounceOptional debounce of the didInput eventnumber0
disableddisabledRenders input as disabled and prevents changesbooleanfalse
errorerrorShows an error icon in the end slot when true. If a string is passed in, it will render the icon as a tooltip. Has no effect on form validationanyundefined
formatformatFormatters functions that are applied as the user types(newValue: string, oldValue?: string, ev?: InputEvent) => string | Promise<string>undefined
inputModeinput-modePassed to native inputstringundefined
labellabelText above the controlstringundefined
maxmaxPassed to native inputanyundefined
maxlengthmaxlengthPassed to native inputnumberundefined
minminPassed to native inputanyundefined
minlengthminlengthPassed to native inputnumberundefined
multilinemultilineWhether the control is a multiline textareabooleanfalse
notenoteInformational message directly below the controlstringundefined
originalValueoriginal-valueThe default value the control will reset to in a form. If not set, will default to the inital value of the "value" property.stringundefined
patternpatternPassed to native inputstringundefined
pendingpendingShows a loading indicator in the end slot when truebooleanfalse
placeholderplaceholderInput placeholder textstringundefined
readonlyreadonlyRenders input as read only and prevents changesbooleanfalse
requiredrequiredMarks as required in form and adds asterisk to the end of the labelbooleanfalse
sizesizeContainer size"lg" | "md" | "sm"'md'
spellcheckspellcheckPassed to native inputbooleanfalse
stepstepPassed to native inputstringundefined
successsuccessShows a success icon in the end slot when true. Has no effect on form validationbooleanfalse
suppressDefaultBehaviorsuppress-default-behaviorWhether to suppress the default behavior of the input eventbooleanfalse
transformtransformTransforms the value before it is passed to the input (from) and after the input emits a new value (to). There are built-in transformers for 'number', 'date', and 'datetime'."date" | "datetime" | "number" | ({ to?: (value: string) => any; from?: (value: any) => string; })undefined
typetypePassed to native inputstring'text'
validatorsvalidatorsValidator functions for form participationValidationFn[]undefined
valuevalueCurrent value of the inputanyundefined
wrapwrapPassed to native textareastringundefined

Events

EventDescriptionType
valueChangeEmits as the user typesCustomEvent<any>

Methods

getErrors() => Promise<{ requiredError: boolean; minLengthError: boolean; maxLengthError: boolean; patternError: boolean; customErrors: string[]; hasError: boolean; }>

Returns

Type: Promise<{ requiredError: boolean; minLengthError: boolean; maxLengthError: boolean; patternError: boolean; customErrors: string[]; hasError: boolean; }>

getInputElement() => Promise<HTMLInputElement | HTMLTextAreaElement>

Returns

Type: Promise<HTMLInputElement | HTMLTextAreaElement>

isTouched() => Promise<boolean>

Returns

Type: Promise<boolean>

markAsTouched() => Promise<void>

Returns

Type: Promise<void>

Shadow Parts

PartDescription
"container"
"input"
"label"
"note"
"textarea"

Dependencies

Depends on

Graph


Built with StencilJS