vitejs-newmenu

0.1.18 • Public • Published

Vitejs NewMenu

Vitejs NewMenu is a responsive header menu component built with Vite, Vanilla JS, and SCSS. It can be easily integrated into any web project.

Installation

Install the package using npm:

npm install vitejs-newmenu

Usage

  1. Import the JavaScript and CSS files into your project:
import 'vitejs-newmenu';
import 'vitejs-newmenu/dist/assets/style.css';
  1. Include the index.html file from the dist folder in your project. You can either copy the content of the index.html file and paste it into your project's HTML file, or you can load it using JavaScript:
async function loadNewMenu() {
  const response = await fetch('node_modules/vitejs-newmenu/dist/index.html');
  const html = await response.text();
  const container = document.querySelector('#newmenu-container');
  container.innerHTML = html;
}

loadNewMenu();

Make sure to add a container element with the id "newmenu-container" in your HTML file:

<div id="newmenu-container"></div>
  1. Customize the menu items and appearance as needed.

Readme

Keywords

none

Package Sidebar

Install

npm i vitejs-newmenu

Weekly Downloads

1

Version

0.1.18

License

none

Unpacked Size

340 kB

Total Files

11

Last publish

Collaborators

  • jillella