gov-form-input
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
accessibleHidePasswordLabel | accessible-hide-password-label | Accessible text to hide the password | "Skrýt heslo" | 'Skrýt heslo' |
accessibleShowPasswordLabel | accessible-show-password-label | Accessible text for password display | "Zobrazit heslo" | 'Zobrazit heslo' |
autocomplete | autocomplete | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocomplete | boolean | undefined |
autocorrect | autocorrect | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-autocorrect | boolean | undefined |
cols | cols | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-cols | number | undefined |
disabled | disabled | Makes the input component disabled. | boolean | false |
identifier | identifier | Custom input identifier. | string | undefined |
inputLang | input-lang | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang | string | undefined |
inputType | input-type | Same as original parameter | "color" | "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "url" | "week" | "text" |
invalid | invalid | Indicates the entered value does not conform to the format expected by the application. | boolean | undefined |
max | max | Maximum value that is acceptable and valid for the input containing the attribute | number | string | undefined |
maxlength | maxlength | Maximum length (number of characters) of value | number | undefined |
min | min | Minimum value that is acceptable and valid for the input containing the attribute | number | string | undefined |
minlength | minlength | Minimum length (number of characters) of value | number | undefined |
multiline | multiline | Generates a texarea for the possibility of multiple lines | boolean | undefined |
name | name | Name of the input. | string | undefined |
placeholder | placeholder | Text that appears in the form control when it has no value set | string | undefined |
readonly | readonly | The value is not editable | boolean | undefined |
required | required | Set 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. | boolean | false |
role | role | Same as original parameter | string | undefined |
rows | rows | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#attr-rows | number | undefined |
size | size | Input’s size. | "l" | "m" | "s" | "xl" | "xs" | "m" |
spellcheck | spellcheck | Same as original parameter https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/spellcheck | boolean | undefined |
success | success | Indicates the entered value of child form element does conform to the format expected by the application. | boolean | undefined |
type | type | Defined the visual style of input | Type | undefined |
value | value | Value of input | string | undefined |
Events
| Event | Description | Type |
|---|---|---|
gov-blur | Emitted when the input loses focus. | CustomEvent<FormInputEvent> |
gov-focus | Emitted when the input has focus. | CustomEvent<FormInputEvent> |
gov-hydrated | Emitted when the input change value. | CustomEvent<void> |
gov-input | Emitted when the input change value. | CustomEvent<FormInputEvent> |
gov-keydown | Emitted when the input change value. | CustomEvent<FormInputEvent> |
gov-keyup | Emitted 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
| Name | Type | Description |
|---|---|---|
options | FocusOptions |
Returns
Type: Promise<void>
setValue(value: string) => Promise<void>
Sets the ordered value of the element
Parameters
| Name | Type | Description |
|---|---|---|
value | string |
Returns
Type: Promise<void>
Dependencies
Used by
Depends on
Graph
Built with StencilJS