The Textarea Component is based mainly on the Input component and provides an integration with the autosize library. This is as simple as adding the autosize
attribute to the element:
<x-splade-textarea name="biography" autosize />
If you want to enable autosize on every textarea element, you may use the static defaultAutosize
on the Textarea
class, for example, in the AppServiceProvider
class:
use ProtoneMedia\Splade\Components\Form\Textarea;
Textarea::defaultAutosize();