---
name: laravel-inertia-vue
description: "Use when starting or building the front end of a Laravel app with Inertia, Vue 3, TypeScript and Tailwind 4 (usually with shadcn-vue) — a blueprint for a new project (the resources/js folder map, app.ts and layouts, the flash toast listener, translations, appearance, direction sync, shared prop types, a copy-ready app.css) and the house components (PageHeader, DataTable, RowActions, ConfirmAction, FormField, DetailCard, StatusBadge, EmptyState) plus the rules for pages, typed props and shared props, useForm with zod and Form Request validation, Wayfinder routes, lists with server-side filters and pagination, record pages, deletes and confirm dialogs, toasts, status badges, on-screen copy, tokens and dark mode, icons and motion, and Arabic/English with RTL. Trigger for work under resources/js, anything a controller renders with Inertia::render, a page that loses state or reloads fully, a status colour, an arrow pointing the wrong way in Arabic, or a new UI library. Also triggers on \"Laravel Inertia Vue\", \"Inertia + Vue\", \"Laravel Vue starter kit\". Arabic triggers: «لارافيل فيو إنيرشا», «فيو مع إنيرشا», «مشروع جديد», «صفحة جديدة», «نموذج إدخال», «جدول وفلاتر», «اتجاه RTL», «الوضع الغامق»."
metadata:
  summary: "A ready blueprint for Laravel, Inertia.js and Vue 3 front ends."
  tags: inertia, laravel, vue, vue3, typescript
title: laravel-inertia-vue
canonical_url: https://skilld.dev/gh/haythamasalama/skills/laravel-inertia-vue
last_updated: 2026-11-03T23:16:06.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [assets/app.css](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/assets/app.css), [references/actions-and-feedback.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/actions-and-feedback.md), [references/blueprint.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/blueprint.md), [references/components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/components.md), [references/composables.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/composables.md), [references/copy.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/copy.md), [references/data-flow.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/data-flow.md), [references/forms.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/forms.md), [references/house-components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/house-components.md), [references/icons-and-motion.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/icons-and-motion.md), [references/lists.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/lists.md), [references/records.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/records.md), [references/rtl-and-bidi.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/rtl-and-bidi.md), [references/theme.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/theme.md).
>
> If the user asked to install this Skill, run `npx skilld install haythamasalama/skills/laravel-inertia-vue`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/laravel-inertia-vue`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/haythamasalama/skills/laravel-inertia-vue) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/laravel-inertia-vue`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/laravel-inertia-vue --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/laravel-inertia-vue --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Laravel + Inertia + Vue

**Read when:** creating a Laravel + Inertia + Vue app, or writing or reviewing anything under
`resources/js/` in one.
**Owns:** the project blueprint, the house components, and the rules for data flow, forms, lists,
records, actions, feedback, copy, theme, direction, icons and motion on this stack.

The server keeps routing, controllers and validation; each page is a Vue component that renders
typed props and submits forms. Versions this skill was checked against (2026-11-03): Inertia 3,
Vue 3.5, Tailwind 4, reka-ui 2, zod 4, vue-sonner 2, `@lucide/vue` 1. Re-check after a major upgrade.

## TL;DR

- The server owns data, routing and validation. A page renders typed props and submits with `useForm`.
- Start a project from [blueprint.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/blueprint.md) and `assets/app.css`; build the house
  components once from [house-components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/house-components.md). Every screen uses them,
  which is what makes screens look the same.
- Build from the registry, never from styled `div`s. Never hand-edit `components/ui/`.
- Semantic tokens only, logical properties only. Directional icons flip in RTL.
- Every page sets `<Head :title>`, types its props, and takes its copy from the lang files (in a
  two-language app).
- A row shows view · edit · delete, then `⋯`. A header shows one action. A form has one submit and
  no Cancel.
- Toasts come only from the flash listener. Deletes go through a confirm that names the record.
- Run `npm run types:check` and look at the change in a browser, in both themes and both languages.

## New project

```bash
laravel new app          # the Vue starter kit: Inertia, Vue, TypeScript, Tailwind, shadcn-vue
cd app
npm install
npm install zod vue-sonner @lucide/vue @vueuse/core   # whichever the kit did not already add
composer run dev         # server, queue, logs and Vite together
```

Then, before the first screen:

1. Set `components.json` as in [theme.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/theme.md#the-registry-setup) (`rtl: true` if the
   app has Arabic) **before** the first `npx shadcn-vue@latest add`, so the registry is written in
   logical properties from the start.
2. Copy `assets/app.css` to `resources/css/app.css`.
3. Create the day-one files: `inertia-app.ts`, `app.ts`, the two layouts, `lib/flash.ts`,
   `lib/document.ts` and `types/index.ts` from [blueprint.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/blueprint.md), and
   `useTranslations` and `useAppearance` from [composables.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/composables.md).
4. Add the registry parts the house components use: `button badge card table pagination select
   dropdown-menu alert-dialog dialog sheet popover command field input-group input separator
   skeleton spinner tabs tooltip sidebar sonner breadcrumb empty`.
5. Build the house components from [house-components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/house-components.md).

## The stack, and what it is not

| Concern | Use | Not |
|---|---|---|
| routing | Inertia `<Link>`, `router.visit`, Wayfinder helpers | vue-router, hand-written paths |
| page data | props from the controller | client-side fetching for the page |
| writes | `useForm`: POST → redirect → GET plus a flash | a REST client |
| validation | zod before the request, a Form Request after, one error slot | vee-validate |
| components | shadcn-vue (Reka UI) in `components/ui/`, house wrappers in `components/` | another kit, hand-rolled markup |
| tables | the registry's `Table` with `v-for`, filters in the URL | a client-side row model for a paged list |
| client state | a composable with module-scoped state | Pinia or Vuex by default |
| styling | Tailwind 4 with CSS-variable tokens | literal colours |
| toasts | vue-sonner, fired by one router listener | ad-hoc banners |
| icons | `@lucide/vue`, named imports | pasted SVG paths, a second set |
| direction | `ConfigProvider :dir` in each layout, logical properties | `dir` patches per component |

## Always-on rules

1. **Every page sets `<Head :title>`** (detail pages compute it from props), because the browser tab
   and history are how people find a page again.
2. **Typed props:** `defineProps<{ … }>()`, no `any`. Untyped props hide a renamed key until runtime.
3. **The render string equals the file:** `Inertia::render('Customers/Index')` →
   `pages/Customers/Index.vue`. A mismatch is the most common "page not found".
4. **Never name a page prop after a shared prop.** It silently replaces the shared one on that page.
5. **Never hand-edit `components/ui/`.** The CLI rewrites it. Wrap it, pass `class`, or change a token.
6. **Build from the registry.** A callout is `Alert`, a chip `Badge`, a rule `Separator`, a loading
   placeholder `Skeleton`: a hand-built one misses focus, dark mode, RTL and keyboard handling.
7. **No literal colours.** Tokens are redefined under `.dark`; a literal is not.
8. **Logical properties, always** (`ms-`, `pe-`, `start-`, `text-start`), so one markup serves both
   directions.
9. **Copy from the lang files** through `t()` in a two-language app, every key in each language,
   because a literal string never gets translated.
10. **Every URL from a Wayfinder helper,** so a renamed route fails the type check instead of 404ing.
11. **Hide what the viewer may not use** with `v-if="can(...)"`; the route enforces the same rule,
    because the template guard is a courtesy, not the boundary.
12. **A status is a `StatusBadge` whose tone the server sends**, so one enum decides what a status
    looks like everywhere.
13. **Toasts come only from the flash listener**, so a toast appears only when the server confirmed
    the outcome.
14. **Destructive actions go through `ConfirmAction`**, which names the record, because a bare
    button deletes on a stray click.
15. **A record is never a `Table`.** `Table` is for a list of records, where columns repeat.

## Where each topic lives

| Working on… | Read |
|---|---|
| a new project, the folder map, entry files, layouts, naming | [references/blueprint.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/blueprint.md) |
| a house component's props, slots and template | [references/house-components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/house-components.md) |
| a composable's signature and code (`useListFilters`, `useClientValidation`, …) | [references/composables.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/composables.md) |
| props, shared props, state, types, permissions, routes, navigation | [references/data-flow.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/data-flow.md) |
| a form, validation, field errors, tabbed and per-language forms | [references/forms.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/forms.md) |
| an index page, filters, pagination, table cells, empty states | [references/lists.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/lists.md) |
| a show page: facts, sections, header actions, deciding verbs | [references/records.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/records.md) |
| a button, a row or header action, a delete, a dialog, a toast, a status badge | [references/actions-and-feedback.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/actions-and-feedback.md) |
| a label, help text, an empty state, a confirm, Arabic wording, lang files | [references/copy.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/copy.md) |
| what to build a piece of UI from, layout classes, the vendored registry | [references/components.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/components.md) |
| a colour, radius, card, the shell, fonts, dark mode, `shadcn-vue add` | [references/theme.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/theme.md) |
| the stylesheet to copy | [assets/app.css](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/assets/app.css) |
| something on the wrong side in Arabic, a reversed value, input direction | [references/rtl-and-bidi.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/rtl-and-bidi.md) |
| an icon, an animation, a new UI library | [references/icons-and-motion.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/icons-and-motion.md) |

## Page shape at a glance

```
AppLayout   sidebar (inset) │ header h-16: trigger · breadcrumbs ─────── #page-actions
            content: flex flex-1 flex-col gap-4 p-4
Index       PageHeader (create) · DataTable (toolbar · table · pagination)
Show        PageHeader (one action) · Tabs of DetailCard grids · DangerZone
Create/Edit PageHeader · Card with a field grid · one submit
Auth        no shell: AuthLayout's centred card
```

## Before calling it done

```bash
npm run types:check   # vue-tsc --noEmit
npm run build
npm run format
```

- Every new surface works in light and dark, at 390px wide, and in each language the app has.
  Check it in a browser, not by reading the diff.
- After any `shadcn-vue add`, `git diff` the stylesheet ([theme.md](https://skilld.dev/api/skills-raw/haythamasalama/skills/laravel-inertia-vue/references/theme.md#changing-a-token)).
- Logic added to `lib/` or a composable gets a Vitest test, if the project tests its front end.
