n-anchor

Implement in-page anchor navigation and dynamic tables of contents with Vue and Naive UI.

8|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-anchor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: n-anchor
Source: https://github.com/jiaiyan/naive-ui-skills/tree/main/components/n-anchor
Command: npx skills add https://github.com/jiaiyan/naive-ui-skills --skill n-anchor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps developers implement anchor-based navigation and a table of contents for long pages by tracking user scroll position and highlighting the current section.

Core Features & Use Cases

  • Scroll-tracking with active link highlighting to orient readers.
  • Nested anchors for hierarchical content structures.
  • Affix-ready behavior with customizable rail styling and background.
  • Simple API using n-anchor and n-anchor-link components for quick integration.

Quick Start

Add the n-anchor component to your page and supply n-anchor-link children with matching href targets.

Frequently Asked Questions about n-anchor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add scroll-tracking anchor navigation to a Vue documentation page?

Scroll-tracking anchor navigation is implemented by adding the n-anchor component to a Vue page and supplying n-anchor-link children with href targets that match section IDs to highlight the current content.

How does in-page anchor navigation handle hierarchical content structures?

In-page anchor navigation handles hierarchical content by supporting nested anchors, allowing developers to create a dynamic table of contents that accurately reflects multi-level sections within long-form documentation.

Does this anchor navigation component require Naive UI to function?

Yes, this anchor navigation component requires both Vue and Naive UI to function, utilizing a frontmatter-driven API alongside the n-anchor and n-anchor-link components for proper integration.

What is the best way to build a dynamic table of contents for long product manuals?

The best way to build a dynamic table of contents for long product manuals is using affix-ready anchor components with customizable rail styling and background to orient readers during scroll tracking.

Can I use this anchor navigation for multi-section dashboards?

Yes, you can use this anchor navigation for multi-section dashboards, as it is specifically applicable to documentation sites, product manuals, and multi-section dashboards requiring active scroll position tracking.