Download the PHP package onokumus/metismenujs without Composer

On this page you can find all versions of the php package onokumus/metismenujs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package metismenujs

metismenujs

Collapsible menu plugin with Vanilla-JS

[![npm version](https://img.shields.io/npm/v/metismenujs.svg?style=flat-square)](https://www.npmjs.org/package/metismenujs) [![install size](https://img.shields.io/badge/dynamic/json?url=https://packagephobia.com/v2/api.json?p=metismenujs&query=$.install.pretty&label=install%20size&style=flat-square)](https://packagephobia.now.sh/result?p=metismenujs) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/metismenujs?style=flat-square)](https://bundlephobia.com/package/metismenujs@latest) [![npm downloads](https://img.shields.io/npm/dm/metismenujs.svg?style=flat-square)](https://npm-stat.com/charts.html?package=metismenujs) [![](https://data.jsdelivr.com/v1/package/npm/metismenujs/badge)](https://www.jsdelivr.com/package/npm/metismenujs) [![Packagist](https://img.shields.io/packagist/v/onokumus/metismenujs.svg)](https://packagist.org/packages/onokumus/metismenujs)

Table of Contents

Browser Support

This plugin does not support any version of IE browser.

Chrome Firefox Safari Opera Edge IE
Latest ✔ Latest ✔ Latest ✔ Latest ✔ Latest ✔

Install

Package Managers

Using npm:

Using yarn:

Using pnpm:

Once the package is installed, you can import the library using import or require approach:

If you use require for importing, only default export is available:

Note CommonJS usage In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with require(), add the following to your tsconfig.json:

CDN

ES6 UMD browser module

Using jsDelivr CDN:

Using unpkg CDN:

ES6 ES module

Using jsDelivr CDN:

Using unpkg CDN:

Install with composer

Download

download

Ready to use files are located in the dist directory.

Usage

  1. Include metismenujs StyleSheet

    Using CDN

    jsDelivr :

    unpkg :

    Using Vite, Astro etc.

    or sass source file

  2. Add class metismenu to unordered list

  3. Make expand/collapse controls accessible

    Be sure to add aria-expanded to the element a. This attribute explicitly defines the current state of the collapsible element to screen readers and similar assistive technologies. If the collapsible element is closed by default, it should have a value of aria-expanded="false". If you've set the collapsible element's parent li element to be open by default using the active class, set aria-expanded="true" on the control instead. The plugin will automatically toggle this attribute based on whether or not the collapsible element has been opened or closed.

  4. Arrow Options

    add has-arrow class to a element

  5. Call the plugin:

Stopping list opening on certain elements

Setting aria-disabled="true" in the <a> element as shown will stop metisMenu opening the menu for that particular list. This can be changed dynamically and will be obeyed correctly:

Options

Option Type Default Description Example
toggle Boolean true For auto collapse support. new MetisMenu("#menu", { toggle: false });
triggerElement css selector a new MetisMenu("#menu", { triggerElement: '.nav-link' });
parentTrigger css selector li new MetisMenu("#menu", { parentTrigger: '.nav-item' });
subMenu css selector ul new MetisMenu("#menu", { subMenu: '.nav.flex-column' });

API

dispose

For stop and destroy metisMenu.

update

Re-init metisMenu.

Events

Event Type Description
show.metisMenu This event fires immediately when the show instance method is called.
shown.metisMenu This event is fired when a collapse ul element has been made visible to the user (will wait for CSS transitions to complete).
hide.metisMenu This event is fired immediately when the hide method has been called.
hidden.metisMenu This event is fired when a collapse ul element has been hidden from the user (will wait for CSS transitions to complete).

CSS custom properties (variables)

Property Default Description
--mm-transition-timing-function ease This property sets how intermediate values are calculated for CSS properties being affected by a transition effect.
--mm-trantisition-duration 0.35s This property sets the length of time a transition animation should take to complete.

Migrating to v1.0.3 from v1.4.0

Examples

https://github.com/metismenu/examples

Demo

https://onokumus.github.io/metismenujs

Contains a simple HTML file to demonstrate metisMenu plugin.

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Osman Nuri Okumus

License

Copyright © 2023, Osman Nuri Okumuş. Released under the MIT License.


All versions of metismenujs with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onokumus/metismenujs contains the following files

Loading the files please wait ....