@props([ 'name', 'label' => null, 'aspectRatio' => null, // e.g. 1 for square, 16/9, null = freeform 'existingUrl' => null, 'help' => null, 'error' => null, // See forms/input.blade.php's comment — same _field.blade.php superset guard. 'value' => null, 'required' => false, 'type' => null, 'checked' => false, 'options' => [], 'selected' => null, ]) @php $resolvedError = $error ?? $errors->first($name); // Must be known server-side and match the value handed to the JS factory // below exactly — modal.blade.php compiles this into an Alpine // `$event.detail == '{{ $name }}'` comparison at render time, so both // sides need the identical deterministic string, not a client-generated one. $cropModalName = 'image-crop-'.$name; @endphp

Crop Image

Crop preview

Drag to reposition. Arrow keys nudge the crop box (Shift for larger steps).

Cancel Apply Crop