A simple sliding panel to display off-canvas contents. The panel pushes the exiting body content to the specified direction and smoothly transitions into the view area. This plugin uses css transforms (translate3d) and cubic bezier transitions to achieve the sliding effect.
git clone https://github.com/sudharti/slider-panel.git
git clone https://github.com/sudharti/slider-panel.git
slider-panel/ ├── dist/ │ ├── css/ │ │ ├── slider-panel.css │ │ └── slider-panel.min.css │ │ │ └── js/ │ ├── slider-panel.js │ └── slider-panel.min.js │ ├── assets/ │ ├── css/ │ └── js/ ├── src/ │ ├── coffee/ │ │ └── slider-panel.coffee │ └── scss/ │ ├── _dimension.scss │ ├── _panel.scss │ ├── _transform.scss │ ├── _translate.scss │ ├── _variables.scss │ └── slider-panel.scss ├── code-templates/ ├── index.html ├── Gruntfile.js ├── package.json ├── README.md └── LICENSE
npm install -g grunt-cli
Slide panel is automatically invoked by setting data attributes
<body data-slide='[push overlay]'>...</body>
<div class='slider-panel'>...</div>
<div class='wrapper'>...</div>
<a data-panel='panel-id' data-dir='[left right]' data-dim='[true false]' href>...</a>
Attribute | Options | Description |
---|---|---|
data-slide | [push overlay] | Whether the panel shoudl push or overlay over content |
data-panel | [target panel id] | The Target panel id |
data-dir | [left right top bottom] | The Direction in which panel should appear |
data-dim | [true false] | Dim page content or not |
Alternatively you can manually invoke the slider panel using Javascript.
<body data-slide='[push overlay]'>...</body>
<div class='slider-panel'>...</div>
<div class='wrapper'>...</div>
$(element).sliderpanel(options);