@johnnyw2001 The first example has the limitation that the only things you can set are what are in the props. So with that example, I can’t set the input to be disabled, or add autofocus, or additional attributes for other input types such as min and max, or add any data- attributes or aria- attributes. Whereas Jetstream’s, any attributes I pass to the component are applied. So for this reason, Jetstream’s is far more usable that the first.
My own input Blade component looks like this:
@props(['id' => null, 'name'])
<input {{ $attributes->class(['form-control'])->merge(['id' => $id ?? $name, 'name' => $name, 'type' => 'text']) }}>
It automatically adds Bootstrap’s form-control class (you can change this to be Tailwind or whatever), and requires just a name by default. Any other attribute I pass when creating the component, will be passed to the component.