Vue Router Advanced Patterns

Implement advanced Vue Router patterns including guards, nested routes, and lazy loading.

6/11/2026
Prompt
I need help with advanced Vue Router patterns.

**Application Structure:**
- Number of routes: [X]
- Nested routes needed: [describe hierarchy]
- Protected routes: [list them]

**Current Router Setup:**
```javascript
[paste current router configuration]
```

**Advanced Features Needed:**
- Navigation guards: [global/per-route/in-component]
- Route meta fields: [what data]
- Scroll behavior: [requirements]
- Transitions: [yes/no]

**Authentication:**
- Auth system: [describe]
- Role-based access: [yes/no]

Please provide:
1. Optimized router configuration
2. Navigation guard implementations
3. Nested route patterns
4. Lazy loading with suspense
5. Route meta handling
6. Scroll behavior configuration
7. Transition animations between routes

Or press ⌘C to copy

Variables (1)

Replace these placeholders with your own content before using the prompt.

[X]

Ready to use?

Copy and paste into your favorite AI tool

Works With

Test this prompt live

Try it in our AI Playground with Claude

Open Playground

Explore more Coding prompts

Browse Coding

Command Palette

Search for a command to run...