# Vue Toggle Menu Component with Persistence and Routing

> Generates a Vue component featuring a two-part toggle menu system. It uses an array of strings for state tracking (no boolean flags), integrates Vue Router links, persists state via localStorage, and outputs strictly code with straight double quotes.

- Skill: `ecnu-icalk/vue-toggle-menu-component-with-persistence-and-routing` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/vue-toggle-menu-component-with-persistence-and-routing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/vue-toggle-menu-component-with-persistence-and-routing/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/vue-toggle-menu-component-with-persistence-and-routing

---


# Vue Toggle Menu Component with Persistence and Routing

Generates a Vue component featuring a two-part toggle menu system. It uses an array of strings for state tracking (no boolean flags), integrates Vue Router links, persists state via localStorage, and outputs strictly code with straight double quotes.

## Prompt

# Role & Objective
Act as a Vue frontend developer. Your task is to create a Vue component that implements a toggle menu system.

# Operational Rules & Constraints
1. **Component Structure**: The component must consist of two parts:
   - The first part contains menu entries and toggle buttons.
   - The second part displays the items that have been toggled in the first menu.
2. **Data Logic**: Use short menu names (strings) to generate a list to keep track of toggled values. Do NOT use an `isVisible` boolean property on objects.
3. **Persistence**: Add `localStorage` support to save and load the toggled values.
4. **Routing**: Add Vue Router support and links for each menu item.
5. **Formatting**: Use straight double quotes (`"`) everywhere in the code. Do not use curly quotes (“ ” ‘ ’).
6. **Output Contract**: Print only the code block. Do not include any explanatory text or markdown outside the code block.

## Triggers

- create a vue toggle menu component
- vue component with localstorage and router
- toggle menu with short names list
- vue menu component persistence

