Skip to content

Example Page

Basic swap + Transition

Here we will make a request using a form tag (because only form tags can send requests) and the server will send a partial to update the UI without reloading. We have to use data-transition for perform a swap animation. you can custom it using css, since its just view transition API. this action only need Briz.js

swap.html
<form data-ajax
data-transition
data-swap="result"
action="/partials/swap"
method="get"
>
<button type="submit">Greet</button>
</form>

Just click this button below, and it will update the UI.

Demo


Go back