Skip to contents

Create a InputText component

Usage

calcite_input_text(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
alignmentalignmentSpecifies the text alignment of the component's value."end" | "start"TRUE
autocompleteNASpecifies the type of content to autocomplete, for use in forms. Read the native attribute's documentation on MDN for more info.AutoFillFALSE
clearableclearableWhen true, a clear button is displayed when the component has a value.booleanTRUE
disableddisabledWhen true, interaction is prevented and the component is displayed with lower opacity.booleanTRUE
formformThe id of the form that will be associated with the component. When not set, the component will be associated with its ancestor form element, if any.stringTRUE
iconiconSpecifies an icon to display.boolean | stringTRUE
iconFlipRtlicon-flip-rtlWhen true, the icon will be flipped when the element direction is right-to-left ("rtl").booleanTRUE
labellabelAccessible name for the component's button or hyperlink.stringFALSE
loadingloadingWhen true, the component is in the loading state and calcite-progress is displayed.booleanTRUE
maxLengthmax-lengthWhen the component resides in a form, specifies the maximum length of text for the component's value.numberTRUE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
minLengthmin-lengthWhen the component resides in a form, specifies the minimum length of text for the component's value.numberTRUE
namenameSpecifies the name of the component. Required to pass the component's value on form submission.stringTRUE
patternpatternWhen the component resides in a form, specifies a regular expression (regex) pattern the component's value must match for validation. Read the native attribute's documentation on MDN for more info.stringFALSE
placeholderplaceholderSpecifies placeholder text for the component.stringFALSE
prefixTextprefix-textAdds text to the start of the component.stringFALSE
readOnlyread-onlyWhen true, the component's value can be read, but cannot be modified.booleanTRUE
requiredrequiredWhen true and the component resides in a form, the component must have a value in order for the form to submit.booleanTRUE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
statusstatusSpecifies the status of the input field, which determines message and icons."idle" | "invalid" | "valid"TRUE
suffixTextsuffix-textAdds text to the end of the component.stringFALSE
validationIconvalidation-iconSpecifies the validation icon to display under the component.boolean | stringTRUE
validationMessagevalidation-messageSpecifies the validation message to display under the component.stringFALSE
validityNAThe current validation state of the component.Check API referenceFALSE
valuevalueThe component's value.stringFALSE

Events

The following events are observed by shiny:

EventDescription
calciteInputTextChangeFires each time a new value is typed and committed.
calciteInputTextInputFires each time a new value is typed.

Slots

The following slots are provided by this component:

SlotDescription
actionA slot for positioning a button next to the component.

Examples

calcite_input_text()
#> <calcite-input-text></calcite-input-text>