Skip to content

Generate a html menu based on headlines in a single page

Notifications You must be signed in to change notification settings

DennisSmuda/generate-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate Menu

Outputs a html menu structure to a target <ul> and sets up links to the corresponding sections within your page, which are scrolled to by scroll-to-element

NPM

MenuGenerator(selector, target)

Options
ToDo :

expose easing options

sub-menus?

Usage

import generateMenu from 'menu-generator'

// - headline is the class selector
// - target is the id of the <ul>
generateMenu('headline', 'test-target');

Develop

git clone git@github.com:DennisSmuda/generate-menu.git
cd generate-menu
npm install
npm start

License

ISC

About

Generate a html menu based on headlines in a single page

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published