InputLayout API

This page provides an overview of the InputLayout component API, detailing its props, emits, slots, and exposed methods/states.

Props

The InputLayout component accepts the following props:

PropDefaultTypeDescription
valuenullanyThe value of the input element within the layout.
isValuefalseboolean or undefinedIndicates whether the input has a value.
mode"outlined"StyleMode or undefinedStyling mode for the input layout.
label""string or undefinedThe label text for the input.
labelMode"offsetDynamic"LabelMode or undefinedThe mode for displaying the label.
isInvalidfalseboolean or undefinedIndicates whether the input is invalid.
messageInvalid""string or undefinedThe validation error message for the input.
requiredfalseboolean or undefinedMarks the input as required.
loadingfalseboolean or undefinedIndicates whether the input is in a loading state.
disabledfalseboolean or undefinedDisables the input field.
help""string or undefinedAdditional help text displayed for the input.
clearfalseboolean or undefinedEnables a clear button for the input.
width""TWidth or undefinedWidth of the input layout.
height"38px"THeight or undefinedHeight of the input layout.
animation"transition-all duration-550""transition-all duration-500" or "transition-none" or string or undefinedAnimation type for transitions within the layout.
classBody"mb-6 rounded-md"StyleClass or "mb-6 rounded-md" or undefinedCustom CSS class for the body of the layout.
class""StyleClass or undefinedCustom CSS class for the layout container.

Emits

The InputLayout component emits the following events:

EmitPayloadDescription
clearvoidEmitted when the clear button is clicked.

Slots

The InputLayout component provides the following slots:

SlotPayloadDescription
defaultVNode[]Default slot for custom content inside the input layout.
beforeVNode[]Slot for content to be displayed before the input field.
afterVNode[]Slot for content to be displayed after the input field.
bodyVNode[]Slot for additional content within the input layout.

Expose

The InputLayout component exposes the following methods and states via ref:

ExposeValueDescription
inputHTMLElement or undefinedReference to the input element within the layout.
inputBodyHTMLElement or undefinedReference to the input body container.
beforeInputHTMLElement or undefinedReference to the element before the input.
afterInputHTMLElement or undefinedReference to the element after the input.
headerHeightnumberThe height of the header in the layout.
isCopybooleanIndicates whether the input value is copied.
beforeWidthnumber or nullThe width of the element before the input.
afterWidthnumber or nullThe width of the element after the input.
valueInputLayoutProps["value"]The current value of the input.
isValueInputLayoutProps["isValue"]Indicates whether the input has a value.
modeInputLayoutProps["mode"]The current styling mode of the input layout.
labelInputLayoutProps["label"]The current label text for the input.
labelModeInputLayoutProps["labelMode"]The current label display mode.
labelTypeInputLayoutProps["labelMode"]The type of label display mode currently applied to the input layout.
isRequiredInputLayoutProps["required"]Indicates whether the input is required.
isLoadingInputLayoutProps["loading"]Indicates whether the input is in a loading state.
isDisabledInputLayoutProps["disabled"]Indicates whether the input is disabled.
isInvalidInputLayoutProps["isInvalid"]Indicates whether the input is invalid.
messageInvalidInputLayoutProps["messageInvalid"]The validation error message for the input.
helpInputLayoutProps["help"]The help text for the input.
widthInputLayoutProps["width"]The width of the input layout.
heightInputLayoutProps["height"]The height of the input layout.
animationInputLayoutProps["animation"]The animation applied to the layout.
classBodyInputLayoutProps["classBody"]Custom CSS class for the body of the layout.
classInputLayoutProps["class"]Custom CSS class for the layout container.

Methods:

  • copy(): void - Copies the current value of the input to the clipboard.
© 2025 FishtVue by Egoka