OnoffCanvas

An off-canvas Plugin

Star Fork Download

Page Canvas

position: fixed

Code

<div class="onoffcanvas is-fixed is-top" id="cft"
  <h1>Top Canvas</h1>
  <a href="#cft" class="onoffcanvas-toggler" data-toggle=onoffcanvas style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-end" id="cfr">
  <h1>Right Canvas</h1>
  <a href="#cfr" class="onoffcanvas-toggler" data-toggle=onoffcanvas style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-bottom" id="cfb">
  <h1>Bottom Canvas</h1>
  <a href="#cfb" class="onoffcanvas-toggler" data-toggle=onoffcanvas style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed is-end" id="cfl">
  <h1>Left Canvas</h1>
  <a href="#cfl" class="onoffcanvas-toggler" data-toggle=onoffcanvas style="width:100px; height:100px;"></a>
</div>

<div class="onoffcanvas is-fixed" id="cff">
  <a href="#cff" class="onoffcanvas-toggler" data-toggle="onoffcanvas" style="width:200px; height:200px;top: 50%;left: 50%;transform: translate(-50%, -50%);"></a>
</div>

Card Canvas

position: absolute

Top Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Right Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Bottom Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Left Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Center Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Full Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.

Hoverable Canvas

position: absolute

Hoverable Canvas

A generic square placeholder image with rounded corners in a figure.
A caption for the above image.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
lorem ipsum ...

onoffcanvas-toggler

Alternative 1. Link with href
<a href="#id" class="onoffcanvas-toggler"  data-toggle="onoffcanvas"></a>

Alternative 2. Button with data-target
<button data-target="#id" class="onoffcanvas-toggler"  data-toggle="onoffcanvas"></button>

onoffcanvas-toggler animation

Alternative 1 : add is-open class to parent

<div id="onoffcanvas1"></div>
<div class="is-open">
  <a href="#onoffcanvas1" data-toggle="onoffcanvas" class="onoffcanvas-toggler"></a>
</div>

Alternative 2 : add is-animated class to onoffcanvas-toggle

<div id="onoffcanvas2"></div>
<a href="#onoffcanvas2" class="onoffcanvas-toggler is-animated"  data-toggle="onoffcanvas"></a>





Top Canvas

Right Canvas

Bottom Canvas

Left Canvas

Center Canvas