Search 71 components and 72 controllers by name, category or description.
Overlay Return
Parent form region that receives a complete HTML field after creating a record in a Modal, Sheet or Drawer, preserving the rest of the draft
Create a customer without leaving a sale
Start a sale and edit its reference, quantity or notes. Open New demo customer, add a fictional label, and return to the same draft with the new customer selected. Cancel the child to keep the previous selection.
Your demo sales
Save a draft or confirm a demo sale to see the result below. Nothing is charged or shipped.
No demo sales yet. Start a sale and try adding a customer without leaving the draft.
<div class="space-y-5">
<hw:alert title="Fictional data only">
This uses the Store demo's session-only data. No real customer account, payment or email is created.
Use invented labels, not personal information.
</hw:alert>
<div class="flex flex-wrap items-center gap-3">
<hw:button as="a" :href="route('store-demo.sales.create')" frame="modal" overlay-size="lg">
New demo sale
</hw:button>
<hw:button as="a" :href="route('store-demo.index')" variant="outline">
Open the Store demo
</hw:button>
</div>
<div class="space-y-3">
<h3 class="font-medium">Your demo sales</h3>
<p class="text-sm text-muted-foreground">
Save a draft or confirm a demo sale to see the result below. Nothing is charged or shipped.
</p>
<div id="store-demo-sales" class="space-y-3" aria-live="polite">
@include('store-demo._sales', ['sales' => $sales])
</div>
</div>
</div>
Mark the field in the parent form
Conceptualhw:overlay-return is a structural region, not another dialog. Its name connects the opening link to the field that receives the result.
Keep the opening link inside the same form as its named region. Only that region is replaced;
other fields and validation errors stay untouched. Different forms can each have a region named
customer without sharing their results.
<hw:form :action="route('store-demo.sales.store')" method="post">
<hw:field name="reference" label="Sale reference">
<hw:input />
</hw:field>
<hw:overlay-return name="customer">
<hw:field name="customer_id" label="Customer">
<hw:select :options="$customers" :selected="$selected" />
</hw:field>
</hw:overlay-return>
<hw:button as="a" :href="route('store-demo.customers.create')"
frame="modal" overlay-return="customer">
New demo customer
</hw:button>
</hw:form>
Return the field and close the child
ConceptualAfter saving, return the complete field, including its label, options and selected value. Close only the child that initiated the request.
returnFromOverlay() updates the captured parent region.
closeOverlay() closes the child and returns focus to its opener.
The same return region works with Modal, Sheet and Drawer.
// After validating and saving the customer:
$origin = $request->overlayOrigin();
if ($origin === null) {
return to_route('store-demo.index');
}
return turbo_stream()
->returnFromOverlay($origin, view('store-demo._customer-field', [
'customers' => $this->state->customers($request),
'selected' => $data['record_id'],
'fieldId' => 'store-customer-'.Str::uuid(),
'restoreOld' => false,
]))
->closeOverlay($origin)
->toast('success', 'Demo customer added');