PHPackages                             monoeq/kirby-inertia - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. monoeq/kirby-inertia

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

monoeq/kirby-inertia
====================

Kirby Inertia Adapter

v1.0.1(5y ago)32701[2 PRs](https://github.com/monoeq/kirby-inertia/pulls)MITPHP

Since Jun 29Pushed 4y ago2 watchersCompare

[ Source](https://github.com/monoeq/kirby-inertia)[ Packagist](https://packagist.org/packages/monoeq/kirby-inertia)[ RSS](/packages/monoeq-kirby-inertia/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Kirby Inertia
=============

[](#kirby-inertia)

[Inertia.js](https://inertiajs.com/) adapter for Kirby 3.

Inertia allows you to build your front end using Javascript (React, Vue and Svelte), while letting the server (in this case, Kirby) take care of routing and shaping data. Think of it as building a normal Kirby site, but the front end is rendered with Javascript.

### How it works

[](#how-it-works)

The basic idea is when loading your site in the browser, Kirby serves up an HTML page with the page data inlined as JSON so your Javascript application can render the page. As you navigate to different pages, requests are sent to Kirby with an `X-Inertia` header, informing Kirby to return only the JSON for the page, rather than a full HTML response. Your Javascript application picks up on this data and renders each new page. You can read a bit more about [how it works on the Inertia site](https://inertiajs.com/how-it-works).

**📌 This readme does not cover how Inertia works, or how to build your front-end. It just outlines the core features implemented to use Kirby as an Inertia backend.**

Setup
-----

[](#setup)

After [installation](#installation), the bare minimum you need to do is define a `default.php` template:

```
DOCTYPE html>
