@props(['name', 'label', 'type' => 'text', 'required' => false, 'placeholder' => null, 'autocomplete' => null])
<div class="form-field">
    <label for="{{ $name }}">{{ $label }} @if($required)<span aria-hidden="true">*</span>@endif</label>
    <input id="{{ $name }}" name="{{ $name }}" type="{{ $type }}" value="{{ old($name) }}" placeholder="{{ $placeholder }}" @required($required) @if($autocomplete) autocomplete="{{ $autocomplete }}" @endif @if($errors->has($name)) aria-invalid="true" aria-describedby="{{ $name }}-error" @endif @class(['is-invalid' => $errors->has($name)])>
    @error($name)<p id="{{ $name }}-error" class="field-error">{{ $message }}</p>@enderror
</div>
