Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ayogohealth/ay-menu-button
An accessible drop-down button polyfill
https://github.com/ayogohealth/ay-menu-button
hacktoberfest web-component
Last synced: 5 days ago
JSON representation
An accessible drop-down button polyfill
- Host: GitHub
- URL: https://github.com/ayogohealth/ay-menu-button
- Owner: AyogoHealth
- License: mit
- Created: 2016-11-10T00:36:26.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-20T17:35:39.000Z (about 1 year ago)
- Last Synced: 2024-11-08T01:02:19.566Z (8 days ago)
- Topics: hacktoberfest, web-component
- Language: TypeScript
- Homepage: https://AyogoHealth.github.io/ay-menu-button/
- Size: 459 KB
- Stars: 2
- Watchers: 10
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
ayMenuButton
============A keyboard-accessible, screen-reader-friendly, dropdown menu button library.
Copyright © 2016 – 2023 Ayogo Health Inc.
Features
--------* Polyfill for the HTML5 `` feature
* Keyboard accessible and screen-reader friendly
* Smooth animation on desktop and mobile
* Supports IE 10+, Safari, Edge, Chrome, Firefox, iOS 8+, and Android 4.4+Usage
-----To get started, install the package from npm: `npm install ay-menu-button`.
We'll use this HTML as our example:
```html
Second Item
Open Menu
```### Basic usage
Add a script tag to your page to reference the index.js file, and upgrade your
button element.```html
var buttonElement = document.getElementById('my-button');
MenuButton(buttonElement);```
### CommonJS/AMD
You can import ayMenuButton as a CommonJS or AMD module for use with tools like
Browserify, RequireJS, and WebPack.```javascript
var MenuButton = require('ay-menu-button');MenuButton(buttonElement);
```### ES6
You can import ayMenuButton as an ES6 module with tools that support `jsnext:main` in package.json.
```javascript
import MenuButton from 'ay-menu-button';MenuButton(buttonElement);
```Notes
-----Released under the terms of the [MIT License](LICENSE).