Skip to content

BaseTextInput

View source on GitHub

A customizable text input component with support for validation, theming, and color context. *

Props

NameTypeRequiredDescription
labelstringnoThe label for the input field.
modelValuestring & numbernoThe value bound to the input field.
idstringnoThe id for the input field.
disabledbooleannoFlag to indicate if the input is disabled.
placeholderstringnoThe placeholder text for the input field.
classTypestringnoThe class type for conditional styling (e.g., "number", "time", "results").
inputColorstringnoThe color context for the input (e.g., "plant", "distillation", "results").
invalidInputbooleannoFlag to indicate if the input is invalid.
storeNamestringnoThe name of the store for value updates.

Emits

  • update:modelValue
  • change:modelValue
  • set:keyboard

Exposed Methods

updateValue()

Updates the model value when input changes.

Parameters:

  • e (Event): The input event.

setKeyboard()

Emits keyboard events.

Parameters:

  • e (Event): The keyboard event.

changeValue()

Emits value change events when input loses focus.

Parameters:

  • e (Event): The blur event.