Design systém gov.cz4.7.0

gov-form-input

Properties

PropertyAttributeDescriptionTypeDefault
accessibleHidePasswordLabelaccessible-hide-password-labelAccessible text to hide the password"Skrýt heslo"'Skrýt heslo'
accessibleShowPasswordLabelaccessible-show-password-labelAccessible text for password display"Zobrazit heslo"'Zobrazit heslo'
autocompleteautocompleteSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocompletebooleanundefined
autocorrectautocorrectSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrectbooleanundefined
colscolsSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-colsnumberundefined
disableddisabledMakes the input component disabled.booleanfalse
identifieridentifierCustom input identifier.stringundefined
inputLanginput-langSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/langstringundefined
inputTypeinput-typeSame as original parameter"color" | "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week""text"
invalidinvalidIndicates the entered value does not conform to the format expected by the application.booleanundefined
maxmaxMaximum value that is acceptable and valid for the input containing the attributenumber | stringundefined
maxlengthmaxlengthMaximum length (number of characters) of valuenumberundefined
minminMinimum value that is acceptable and valid for the input containing the attributenumber | stringundefined
minlengthminlengthMinimum length (number of characters) of valuenumberundefined
multilinemultilineGenerates a texarea for the possibility of multiple linesbooleanundefined
namenameName of the input.stringundefined
placeholderplaceholderText that appears in the form control when it has no value setstringundefined
readonlyreadonlyThe value is not editablebooleanundefined
requiredrequiredSet whether the input is required or not. Please note that this is necessary for accessible inputs when the user is required to fill them. When using this property you need to also set “novalidate” attribute to your form element to prevent browser from displaying its own validation errors.booleanfalse
roleroleSame as original parameterstringundefined
rowsrowsSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rowsnumberundefined
sizesizeInput’s size."l" | "m" | "s" | "xl" | "xs""m"
spellcheckspellcheckSame as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheckbooleanundefined
successsuccessIndicates the entered value of child form element does conform to the format expected by the application.booleanundefined
typetypeDefined the visual style of inputTypeundefined
valuevalueValue of inputstringundefined

Events

EventDescriptionType
gov-blurEmitted when the input loses focus.CustomEvent<FormInputEvent>
gov-focusEmitted when the input has focus.CustomEvent<FormInputEvent>
gov-hydratedEmitted when the input change value.CustomEvent<void>
gov-inputEmitted when the input change value.CustomEvent<FormInputEvent>
gov-keydownEmitted when the input change value.CustomEvent<FormInputEvent>
gov-keyupEmitted when the input change value.CustomEvent<FormInputEvent>

Methods

clearValue() => Promise<void>

Clears input value

Returns

Type: Promise<void>

getRef() => Promise<HTMLInputElement>

Returns an instance of the native html input element

Returns

Type: Promise<HTMLInputElement>

setFocus(options?: FocusOptions) => Promise<void>

Returns the current state of the component

Parameters

NameTypeDescription
optionsFocusOptions

Returns

Type: Promise<void>

setValue(value: string) => Promise<void>

Sets the ordered value of the element

Parameters

NameTypeDescription
valuestring

Returns

Type: Promise<void>

Dependencies

Used by

Depends on

Graph


Built with StencilJS