All Projects → osrec → Superslide.js

osrec / Superslide.js

Licence: gpl-3.0
A flexible, smooth, GPU accelerated sliding menu for your next PWA

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Superslide.js

Hot
Hot is macOS menu bar application that displays the CPU speed limit due to thermal issues.
Stars: ✭ 131 (-73.59%)
Mutual labels:  app, menubar
WaveSideBar
Animated side bar view
Stars: ✭ 38 (-92.34%)
Mutual labels:  menubar, menu
Electron Menubar
Boilerplate for electron menubar application with PopOver with React + Webpack
Stars: ✭ 145 (-70.77%)
Mutual labels:  app, menubar
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+444.76%)
Mutual labels:  menu, menubar
Radialmenu
A highly customizable radial menu that's very easy to setup.
Stars: ✭ 371 (-25.2%)
Mutual labels:  menu, menubar
Devdocs
API Documentation Browser
Stars: ✭ 27,208 (+5385.48%)
Mutual labels:  app, pwa
django-menu-generator
A straightforward menu generator for Django
Stars: ✭ 24 (-95.16%)
Mutual labels:  menubar, menu
React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (-68.75%)
Mutual labels:  menu, menubar
Vuefront
VueFront Core. Turn your old-fashioned CMS website in to a SPA & PWA in 5 minutes
Stars: ✭ 316 (-36.29%)
Mutual labels:  app, pwa
Mockup Generator
Mockup Generator is a macOS app built with AngularJS/Electron that sits in your menu bar allowing you to capture screenshots of your favourite websites and wrap them in device mock-ups.
Stars: ✭ 272 (-45.16%)
Mutual labels:  app, menubar
Spotmenu
Stars: ✭ 2,668 (+437.9%)
Mutual labels:  menu, menubar
Webpack Pwa Manifest
Progressive Web App Manifest Generator for Webpack, with auto icon resizing and fingerprinting support.
Stars: ✭ 447 (-9.88%)
Mutual labels:  app, pwa
Nocturnal
A Dimness and Night Shift menu bar app for macOS 🌙
Stars: ✭ 199 (-59.88%)
Mutual labels:  menu, menubar
Prestashop
Free PWA & SPA for PrestaShop
Stars: ✭ 59 (-88.1%)
Mutual labels:  app, pwa
Vue Dock Menu
⚓Dockable Menu bar for Vue
Stars: ✭ 183 (-63.1%)
Mutual labels:  menu, menubar
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (-67.34%)
Mutual labels:  menubar, menu
Yndropdownmenu
✨ Awesome Dropdown menu for iOS with Swift 5.0
Stars: ✭ 1,259 (+153.83%)
Mutual labels:  menu, menubar
Chinese Lunar Calendar For Mac
Chinese Lunar Calendar for Mac
Stars: ✭ 150 (-69.76%)
Mutual labels:  menu, menubar
currency-converter
💰 Easily convert between 32 currencies
Stars: ✭ 16 (-96.77%)
Mutual labels:  app, pwa
Pretzel
Pretzel is Mac desktop app that shows and find keyboard shortcuts based on your current app.
Stars: ✭ 405 (-18.35%)
Mutual labels:  app, menubar

SuperSlide.js

A lightweight, configurable sliding menu for your next PWA with promises. Only 2k gzipped!

This library aims to provide a highly configurable, ready-to-use sliding menu for your next web application, while delivering native-like animation performance. It was created by the OSREC Technologies while developing Bx, our invoicing, time-tracking and project management PWA.

Installation

npm install superslide.js

Usage

Reference the library in a script tag

<script src='superslide.js'></script>

Add basic HTML markup

<body>
  <div id='content'>Content</div>
  <div id='menu'>Menu</div>
</body>

Add styles (so we can see what's going on!)

<style>
  body     { padding: 0px; margin: 0px; }
  #menu    { background: #ccc; }
  #content { min-height: 100vh; min-width: 100vw; }
</style>

Initialise the menu

var myMenu = new OSREC.superslide
({
    slider: document.getElementById('menu'),
    content: document.getElementById('content'),
    animation: 'slideLeft'
});

// Promise resolves once menu is open
var openPromise = myMenu.open();

Try the demo here

Animations

Standard Version has 4 animation options available:

slideLeft slideRight slideBottom slideTop

PRO version ⭐️ contains many more menu animations (check it out @ https://osrec.co.uk/products/superslidejs)

Parameters

  • animation (string): Any of the animations in the animation library (slideLeft, slideRight, slideTop, slideBottom).

  • duration (integer): Duration in seconds for the slide animation

  • allowDrag (boolean): Allow the menu to be dragged into the open or closed position via touch events.

  • slideContent (boolean): Slide the content along with the menu

  • allowContentInteraction (boolean): Allow the content to be clicked or scrolled while the menu is open

  • closeOnBlur (boolean): Close the menu when the user clicks or taps anywhere outside the menu

  • width (string): The width of the menu (for menus that sit along a vertical edge). Examples: '60vw' or '300px' or '80%'

  • height (string): The height of the menu (for menus that sit along a horizontal edge). Examples: '50vh' or '300px' or '80%'

  • dragThreshold (integer): The number of pixels from the edge from where a user can begin dragging; example: 70. Use with the allowDrag option.

  • openThreshold (integer): When the menu is in the open position, the number of pixels it must be dragged before it opens automatically; example: 30. Use with the allowDrag option.

  • closeThreshold (integer): When the menu is in the closed position, the number of pixels it must be dragged before it closes automatically; example: 20. Use with the allowDrag option.

  • beforeOpen (callback): Executed before the menu begins to open

  • onOpen (callback): Executed straight after the menu has opened

  • beforeClose (callback): Executed before the menu begins to close

  • onClose (callback): Executed as soon as the menu has closed

Methods

  • OSREC.superslide.open() Open the menu. Returns a promise that resolves once the menu opens (i.e. animation completes).

  • OSREC.superslide.close() Close the menu. Returns a promise that resolves once the menu closes (i.e. animation completes).

  • OSREC.superslide.toggle() Toggles the menu. Returns a promise that resolves once the menu has been toggled (i.e. animation completes).

  • OSREC.superslide.isOpen() True if the menu is open, false if closed. The last state if mid-drag. Returns a boolean.

  • OSREC.superslide.ready() Check if the menu is fully initialised. Returns a promise that resolves when fully initialised.

  • OSREC.superslide.destroy() Destroy the menu. This will close the menu if it is open before destroying. Returns null

Credits

Created by the Bx team at OSREC Technologies.

Bx

The library was developed as part of our business and project management app called Bx (you can check it out here).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].