npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ember-off-canvas-sidebar

v0.1.1

Published

Ember addon for off-canvas sidebar menu with transition effects.

Downloads

9

Readme

ember-off-canvas-sidebar

Build and Deploy

semantic-release npm version EmberObserver

Ember addon for off-canvas sidebar menu with transitions.

Installation

ember install ember-off-canvas-sidebar

Usage

Menu

<div id="st-container" class="st-container">
  <EocSidebar @effect="st-effect-1">
    <h2 class="icon icon-lab">Sidebar</h2>
    <ul>
      <li><a class="icon icon-data" href="#">Data Management</a></li>
      <li><a class="icon icon-location" href="#">Location</a></li>
      <li><a class="icon icon-study" href="#">Study</a></li>
      <li><a class="icon icon-photo" href="#">Collections</a></li>
      <li><a class="icon icon-wallet" href="#">Credits</a></li>
    </ul>
  </EocSidebar>


    <div class="st-content"><!-- this is the wrapper for the content -->
      <div class="st-content-inner"><!-- extra div for emulating position:fixed of the menu -->
        <!-- YOUR MAIN CONTENT GOES HERE -->
        <!-- YOU CAN KEEP THE TRIGGER HERE ALSO -->
      </div>
    </div>
</div>

Trigger

<button  {{eoc-sidebar-trigger "st-effect-slide-in-on-top"}}>Slide in on top</button>

See the dummy app for more detailed code on how to use this component.

Styles

Ember off-canvas sidebar come with about 14 different transitions for the sidebar. Just give any one of the following values for the eoc-sidebar-trigger modifier of the trigger element.

  • st-effect-slide-in-on-top (default)
  • st-effect-reveal
  • st-effect-3d-rotate-in
  • st-effect-3d-rotate-out
  • st-effect-delayed-3d-rotate
  • st-effect-fall-down
  • st-effect-open-door
  • st-effect-push
  • st-effect-reverse-slide-out
  • st-effect-rotate-pusher
  • st-effect-scale-down-pusher
  • st-effect-scale-rotate-pusher
  • st-effect-scale-up
  • st-effect-slide-along

Configuring

Add a configuration for ember-off-canvas-sidebar to include only the transitions that you will use.

ENV['ember-off-canvas-sidebar'] = {
  includedTransitions: ['st-effect-open-door', 'st-effect-fall-down'],
  excludedTransitions: ['st-effect-scale-up'],
  excludeBaseStyles: false, // defaults to false
  defaultTransition: 'st-effect-slide-in-on-top',    // defaults to 'st-effect-slide-in-on-top'
};

To exclude or not include a transition, means that it's css styles will not be bundled with your application, thus not polluting your app.

Note: including a blank array e.g. includeTransitions: [] will not include any transitions, leaving you to define your own transition styles. See the vendor/ember-off-canvas-sidebar/transitions directory for reference.

Note: you may also want to set excludeBaseStyles: true so that this addon doesn't include the styles used by all the transitions.

A big Thanks to Ilya Radchenko for making this configuration possible to have a small memory footprint of css in your app when you are using the addon.

Compatibility

  • Ember.js v3.12 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Credits