Code Monkey home page Code Monkey logo

resizable-drawer.js's Introduction

resizable-drawer.js Build Status

CPOL v1.02 License

NPM Packageย  Bower Package

A simple implementation of a resizable drawer using only native JS and CSS.

Includes support for ES6, ES5, AMD, CommonJS, and global inclusion via an HTML script tag and is mobile friendly!.

Install

  • NPM: $ npm install --save resizable-drawer
  • Bower: $ bower install --save resizable-drawer
  • CDN - ES6:
<script src="//unpkg.com/[email protected]/dist/resizable-drawer.js"></script>
<link rel="stylesheet" type="text/css" src="//unpkg.com/[email protected]/dist/resizable-drawer.min.css">
  • CDN - ES5:
<script src="//unpkg.com/[email protected]/dist/resizable-drawer.es5.js"></script>`
<link rel="stylesheet" type="text/css" src="//unpkg.com/[email protected]/dist/resizable-drawer.min.css">

Basic Usage

JSBin JSBin Demo

JavaScript

import ResizableDrawer from 'resizable-drawer';


let myResizableDrawer = new ResizableDrawer(document.querySelector('#myResizableDrawerElement'));

...

myResizableDrawer.destroy();

HTML

<link rel="stylesheet" type="text/css" src="resizable-drawer.min.css">

...

<div id="myResizableDrawerElement" class="resizable-drawer">
  <div class="resizable-drawer-content">...</div>
  <div class="resizable-drawer-handle">&hellip;</div>
</div>

Advanced Usage

JavaScript

import ResizableDrawer from 'resizable-drawer';


let myResizableDrawer = new ResizableDrawer({
  el:           document.querySelector('#myResizableDrawerElement'),
  startEnabled: false,
  startOpen:    false
});

...

myResizableDrawer.destroy();

HTML

<link rel="stylesheet" type="text/css" src="resizable-drawer.min.css">

...

<div id="myResizableDrawerElement" class="resizable-drawer">
  <div class="resizable-drawer-content">...</div>
  <div class="resizable-drawer-handle">&hellip;</div>
</div>

Building the Project

The project is built using Gulp.js. To install Gulp.js, see the Gulp.js "Getting Started" docs.

Run the following at the root of the project for a list of available gulp tasks:

$ gulp help

resizable-drawer.js's People

Contributors

bsara avatar npmcdn-to-unpkg-bot avatar

Stargazers

sean1025 avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.