Custom field attributes
//Field attribute methods and which config value they correspond to
rootAttr(array $attributes, bool $mergeClasses = true) //field-attribute['root']
beforeAttr(array $attributes, bool $mergeClasses = true) //field-attribute['before']
beforeTextAttr(array $attributes, bool $mergeClasses = true) //field-attribute['before-text']
aboveAttr(array $attributes, bool $mergeClasses = true) //field-attribute['above']
belowAttr(array $attributes, bool $mergeClasses = true) //field-attribute['below']
belowWrapperAttr(array $attributes, bool $mergeClasses = true) //field-attribute['below-wrapper']
afterTextAttr(array $attributes, bool $mergeClasses = true) //field-attribute['after-text']
afterLabelAttr(array $attributes, bool $mergeClasses = true) //field-attribute['after-label']
//custom input attribute
inputAttr(array $attributes) //no value in configinputAttr(array $attributes)
Merge with config, example
Input::make('Name')->labelAttr('bg-green-300') //merge with config
Input::make('Name')->labelAttr('bg-green-300', false) //replace configAlpine Js example
Input pattern format, example
Another Alpine Js example
Last updated
Was this helpful?