askill
inertia-vue-development

inertia-vue-developmentSafety 100Repository

Develops Inertia.js v2 Vue client-side applications. Activates when creating Vue pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions Vue with Inertia, Vue pages, Vue forms, or Vue navigation.

0 stars
1.2k downloads
Updated 2/8/2026

Package Files

Loading files...
SKILL.md

Inertia Vue Development

When to Apply

Activate this skill when:

  • Creating or modifying Vue page components for Inertia
  • Working with forms in Vue (using <Form> or useForm)
  • Implementing client-side navigation with <Link> or router
  • Using v2 features: deferred props, prefetching, or polling
  • Building Vue-specific features with the Inertia protocol

Documentation

Use search-docs for detailed Inertia v2 Vue patterns and documentation.

Basic Usage

Page Components Location

Vue page components should be placed in the resources/js/pages directory.

Page Component Structure

Important: Vue components must have a single root element.

Client-Side Navigation

Basic Link Component

Use <Link> for client-side navigation instead of traditional <a> tags:

Link with Method

Prefetching

Prefetch pages to improve perceived performance:

Programmatic Navigation

Form Handling

Form Component (Recommended)

The recommended way to build forms is with the <Form> component:

    <input type="email" name="email" />
    <div v-if="errors.email">{{ errors.email }}</div>

    <button type="submit" :disabled="processing">
        {{ processing ? 'Creating...' : 'Create User' }}
    </button>

    <div v-if="wasSuccessful">User created!</div>
</Form>

Form Component With All Props

    <button type="submit" :disabled="processing">
        {{ processing ? 'Saving...' : 'Save' }}
    </button>

    <progress v-if="progress" :value="progress.percentage" max="100">
        {{ progress.percentage }}%
    </progress>

    <div v-if="wasSuccessful">Saved!</div>
</Form>

Form Component Reset Props

The <Form> component supports automatic resetting:

  • resetOnError - Reset form data when the request fails
  • resetOnSuccess - Reset form data when the request succeeds
  • setDefaultsOnSuccess - Update default values on success

Use the search-docs tool with a query of form component resetting for detailed guidance.

    <button type="submit" :disabled="processing">
        Submit
    </button>
</Form>

Forms can also be built using the useForm composable for more programmatic control. Use the search-docs tool with a query of useForm helper for guidance.

useForm Composable

For more programmatic control or to follow existing conventions, use the useForm composable:

    <input type="email" v-model="form.email" />
    <div v-if="form.errors.email">{{ form.errors.email }}</div>

    <input type="password" v-model="form.password" />
    <div v-if="form.errors.password">{{ form.errors.password }}</div>

    <button type="submit" :disabled="form.processing">
        Create User
    </button>
</form>

Inertia v2 Features

Deferred Props

Use deferred props to load data after initial page render:

Polling

Automatically refresh data at intervals:

WhenVisible (Infinite Scroll)

Load more data when user scrolls to a specific element:

    <WhenVisible
        v-if="users.next_page_url"
        data="users"
        :params="{ page: users.current_page + 1 }"
    >
        <template #fallback>
            <div>Loading more...</div>
        </template>
    </WhenVisible>
</div>

Server-Side Patterns

Server-side patterns (Inertia::render, props, middleware) are covered in inertia-laravel guidelines.

Common Pitfalls

  • Using traditional <a> links instead of Inertia's <Link> component (breaks SPA behavior)
  • Forgetting that Vue components must have a single root element
  • Forgetting to add loading states (skeleton screens) when using deferred props
  • Not handling the undefined state of deferred props before data loads
  • Using <form> without preventing default submission (use <Form> component or @submit.prevent)
  • Forgetting to check if <Form> component is available in your Inertia version

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

95/100Analyzed 2/9/2026

An exceptional technical reference for Inertia.js v2 with Vue. It features clear activation triggers, comprehensive coverage of core and advanced features (like deferred props and polling), and highly actionable code snippets.

100
95
90
95
98

Metadata

Licenseunknown
Version-
Updated2/8/2026
Publisherbabou212

Tags

ci-cd