Skip to content
On this page

NcInputField

Props

Prop nameDescriptionTypeValuesDefault
valueThe value of the input fieldstring-
typeThe type of the input elementstringtext, password, email, tel, url, search'text'
labelThe hidden input label for accessibility purposes. This will also
be used as a placeholder unless the placeholder prop is populated
with a different string.
string-undefined
labelOutsidePass in true if you want to use an external label. This is useful
if you need a label that looks different from the one provided by
this component
boolean-false
labelVisibleWe normally have the label hidden visually and use it for
accessibility only. If you want to have the label visible just above
the input field pass in true to this prop.
boolean-false
placeholderThe placeholder of the input. This defaults as the string that's
passed into the label prop. In order to remove the placeholder,
pass in an empty string.
string-undefined
showTrailingButtonControls whether to display the trailing button.boolean-false
trailingButtonLabelLabel of the trailing button

Required when showTrailingButton is set
string-''
successToggles the success state of the component. Adds a checkmark icon.
this cannot be used together with canClear.
boolean-false
errorToggles the error state of the component. Adds an error icon.
this cannot be used together with canClear.
boolean-false
helperTextAdditional helper text message

This will be displayed beneath the input field. In case the field is
also marked as having an error, the text will be displayed in red.
string-''
disabledDisable the input fieldboolean-false

Events

Event namePropertiesDescription
update:value
trailing-button-click

Slots

NameDescriptionBindings
default
trailing-button-icon

Description

This component is used by the other Fields components. It extends and styles an HTMLInputElement.

You cannot use it as is. This is here for documentation purposes. See the other field components.

For a list of all available props and attributes, please check the HTMLInputElement documentation