Loading...
Examples
Simple
Intercepting clicks on links, displaying a loader and updating the targets' content.
Form
In the following example, we intercept a form submission, display a loader and use a custom view transition to animate only the updated content once the request is finished.
Loading...
Modes
Modes are configured with the data-option-mode attribute.
Loading...
Add to cart / Quickbuy
Loading...
Error handling
Loading...
Cancelling a request
Use the abort method to cancel a request. In the following example, we use the Action component to cancel any pending request from any mounted Fetch component.
Loading...
TIP
In this example, we could use a more specific version of the data-option-target attribute of the Action component to target a single Fetch instance.