Skip to main content
Page components are React components that receive props from your Kit controllers. They live in frontend/src/pages/ and are automatically resolved by Inertia.

Creating a Page Component

Page components are standard React components that receive typed props:

Directory Structure

Organize pages to match your route structure:

Using the CLI Generator

Generate page components with the CLI:
This creates a page component with the correct structure:

Page Component Patterns

List Page

Display a collection of items:

Detail Page

Show a single item:

Form Page

Create or edit items using Inertia’s <Form> component:
Use Inertia’s Link component for SPA-style navigation:

Programmatic Navigation

Navigate programmatically using the router:

Shared Data

Access shared data that’s available on every page:

Layouts

Create reusable layouts for your pages:
Use it in your page:

Summary