All Projects → hydecorp → drawer

hydecorp / drawer

Licence: GPL-3.0 license
A touch-enabled drawer component for the modern web.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to drawer

Push State
Turn static web sites into dynamic web apps.
Stars: ✭ 16 (-38.46%)
Mutual labels:  jquery-plugin, reactive, rxjs, vanilla, web-components, vanilla-js
curved-menu
VanillaJS fully configurable curved menu (circular navigation)
Stars: ✭ 30 (+15.38%)
Mutual labels:  vanilla, vanilla-js, menu, menu-navigation
lego
🚀 Web-components made lightweight & Future-Proof.
Stars: ✭ 69 (+165.38%)
Mutual labels:  reactive, web-components, vanilla-js
smart-custom-element
Smart a lightweight web component library that provides capabilities for web components, such as data binding, using es6 native class inheritance. This library is focused for providing the developer the ability to write robust and native web components without the need of dependencies and an overhead of a framework.
Stars: ✭ 17 (-34.62%)
Mutual labels:  web-components, custom-element
Hc Offcanvas Nav
JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
Stars: ✭ 201 (+673.08%)
Mutual labels:  jquery-plugin, menu
oc-menumanager-plugin
A Menu Management Plugin for October CMS
Stars: ✭ 29 (+11.54%)
Mutual labels:  menu, menu-navigation
Jquery Udraggable
make elements draggable by mouse or touch
Stars: ✭ 107 (+311.54%)
Mutual labels:  jquery-plugin, touch-events
gif-player
Control your animated GIFs
Stars: ✭ 120 (+361.54%)
Mutual labels:  custom-element, webcomponent
rxrest
Reactive rest library
Stars: ✭ 33 (+26.92%)
Mutual labels:  reactive, rxjs
uPortal-web-components
A collection of uPortal Web Components and JavaScript utilities
Stars: ✭ 24 (-7.69%)
Mutual labels:  web-components, menu
wc-monaco-editor
A vanilla Monaco Editor web component
Stars: ✭ 93 (+257.69%)
Mutual labels:  vanilla, web-components
Jquery Ui Contextmenu
jQuery plugin that turns a jQueryUI menu widget into a context menu.
Stars: ✭ 170 (+553.85%)
Mutual labels:  jquery-plugin, menu
Metismenu
Related projects
Stars: ✭ 1,904 (+7223.08%)
Mutual labels:  jquery-plugin, menu
Jquery Menu Editor
Multilevel Menu Editor for Bootstrap 4.x (Html & Javascript code)
Stars: ✭ 144 (+453.85%)
Mutual labels:  jquery-plugin, menu
cookbook
VueJS + NodeJS Evergreen Cookbook
Stars: ✭ 440 (+1592.31%)
Mutual labels:  rxjs, web-components
hipsbarjs
Hipsbarjs is a javascript plugin for easily creating drawers in web apps
Stars: ✭ 17 (-34.62%)
Mutual labels:  drawer, menu-navigation
redrock
Typesafe, reactive redux
Stars: ✭ 14 (-46.15%)
Mutual labels:  reactive, rxjs
Basictable
Basic Table jQuery or Vanilla JS plugin for simple responsive tables.
Stars: ✭ 94 (+261.54%)
Mutual labels:  jquery-plugin, vanilla-js
bassdrum
reactive, type safe components with preact and rxjs.
Stars: ✭ 44 (+69.23%)
Mutual labels:  reactive, rxjs
vue-bottom-navigation
Vue bottom navigation
Stars: ✭ 56 (+115.38%)
Mutual labels:  menu, menu-navigation

hy-drawer

hy-drawer is a touch-enabled drawer component for the modern web. It focuses on providing a fun, natural feel in both the Android and iOS stock browser, while being performant and easy to use. It is the perfect companion for mobile-first web pages and progressive web apps.

A touch-enabled drawer component for the modern web. {:.lead}

hy-drawer is used by hundreds of sites as part of the Hydejack{:.external} Jekyll theme.

NOTE: The current version is still a pre-release. The public API may still change in important ways. {:.message}

Examples

When viewing this page on webcomponents.org, the example below will render as an interactive demo. Otherwise, find the standalone examples below.

<hy-drawer id="drawer" align="left" touch-events mouse-events>
  <p>Arbitrary content here.</p>
</hy-drawer>

<a onclick="window.drawer.toggle()"></a>

When viewing this document on GitHub, npm, or elsewhere, you can check out the standalone examples:

License

hy-drawer is Open Source but not free.

You may use the component in accordance with the GPL-3.0 license, but this means you must be willing to release your code under a GPLv3-compatible license in turn.

For cases were this is not acceptable the following commercial licenses available:

Personal Startup Enterprise
# Developers 2 15
License Personal Startup Enterprise
Price $29 $249 $499
Buy{:.gumroad-button} Buy{:.gumroad-button} Buy{:.gumroad-button}
{:.stretch-table}

Usage

hy-drawer can be used in a variety of ways:

Web Component

The Web Component is the preferred way of using hy-drawer, but requires support in the browser or a polyfill. There are multiple ways of including it on your page:

Bundled ES6 Module

This is the version that is going to have native support across all major browsers the soonest.

<script type="module" href="https://unpkg.com/hy-drawer/dist/webcomponent/module.js"></script>

<hy-drawer touch-events prevent-default><!-- ... --></hy-drawer>

HTML Import

Some browsers have decided against implementing HTML Imports, but they are easily polyfilled.

<link rel="import" href="https://unpkg.com/hy-drawer/dist/webcomponent/hy-drawer.html">

<hy-drawer touch-events prevent-default><!-- ... --></hy-drawer>

Unbundled ES6 Module (experimental)

When loading the component form the unpkg CDN, you can import the source directly by appending the ?module query parameter.

<script type="module" src="https://unpkg.com/hy-drawer/src/webcomponent/module?module"></script>

<hy-drawer touch-events prevent-default><!-- ... --></hy-drawer>

Note that this approach will result in hundreds of separate HTTP requests (one for each module) and is intended for testing and prototypes only. Importing unbundled ES6 modules is much slower than bundled distributions and will remain so for the foreseeable future.

One advantage of this approach is that shared dependencies will not be included twice when using more than one component from the hy-* component family. However, setting up webpack is a better solution in these cases:

Bundlers

You can use hy-drawer with a frontend bundler like webpack or rollup. Just install the component with npm or yarn and import the source in your code:

import 'hy-drawer/src/webcomponent/module';

If you want to have control over when the custom element gets defined, you can also import the HTMLElement like so:

import { HyDrawerElement } from 'hy-drawer/src/webcomponent';
// ...
customElements.define('hy-drawer', HyDrawerElement);

Note that all of hy-drawer's dependencies are valid ES6 modules, so that they can be inlined with webpack's ModuleConcatenationPlugin.

Documentation

Gold Standard

This component follows the WebComponents Gold Standard.

Source

The source code is written in a literal programming style, and should be reasonably approachable. However, some knowledge of RxJS is required.

The core functionality is implemented in mixin / index.js, which is used to create the framework-specific versions of the component.

Size

The size of the minified bundle is around 80kb, or ~17kb gzipped. The majority of it comes from RxJS. When already using RxJS in your project, or using more than one component of the Hydejack component family, consider using a frontend bundler.

Size File
67K dist/jquery/index.js
15K dist/jquery/index.js.gz
63K dist/mixin/index.js
14K dist/mixin/index.js.gz
65K dist/vanilla/index.js
14K dist/vanilla/index.js.gz
69K dist/webcomponent/html-import.js
15K dist/webcomponent/html-import.js.gz
71K dist/webcomponent/index.js
16K dist/webcomponent/index.js.gz
71K dist/webcomponent/module.js
16K dist/webcomponent/module.js.gz
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].