Introduction
The input wrapper component should be used as a wrapper around the input or select components. It provides a border and other elements such as a prefix or suffix.Triggering the error state of the input
The component has special styling that you can use if it is invalid. To trigger this styling, you can use either Blade or Alpine.js. To trigger the error state using Blade, you can pass thevalid attribute to the component, which contains either true or false based on if the input is valid or not:
true or false:
Disabling the input
To disable the input, you must also pass thedisabled attribute to the wrapper component:
Adding affix text aside the input
You may place text before and after the input using theprefix and suffix slots:
Using icons as affixes
You may place an icon before and after the input using theprefix-icon and suffix-icon attributes:
Setting the affix icon’s color
Affix icons are gray by default, but you may set a different color using theprefix-icon-color and affix-icon-color attributes: