https://github.com/isy/vue-toc
A table of contents component for vue.js
https://github.com/isy/vue-toc
components tableofcontents toc vue vue-toc
Last synced: 5 months ago
JSON representation
A table of contents component for vue.js
- Host: GitHub
- URL: https://github.com/isy/vue-toc
- Owner: isy
- Created: 2019-06-16T08:03:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:54:32.000Z (over 3 years ago)
- Last Synced: 2025-08-09T18:49:11.162Z (10 months ago)
- Topics: components, tableofcontents, toc, vue, vue-toc
- Language: Vue
- Size: 1.38 MB
- Stars: 7
- Watchers: 2
- Forks: 4
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-toc [](https://travis-ci.org/isy/vue-toc)
> Vue.js component that automatically generates a table of contents.
## Install
`$ npm install vue-toc`
Register the component
```javascript
import Vue from 'vue'
import VueToc from 'vue-toc'
Vue.component('vue-toc', VueToc)
```
## Options
|key|description|default|val|
|:---|---|---|---|
|`target`|Specify the location of the heading|`none`|`String`|
|`h2Class`|Specify css class in table of contents(h2)|`toc-2`|`String`|
|`h3Class`|Specify css class in table of contents(h3)|`toc-3`|`String`|
`※Please be sure to attach an ID to the h2 and h3 tags for in-page links`