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

@movigo/drawer

v0.2.0

Published

Movigo plugin to create drawer animations.

Downloads

9

Readme


:paperclip: Table of Contents

Install

NPM

You can install Movigo drawer plugin with NPM:

npm install @movigo/drawer --save

CDN

You can also load it with CDNs:

  <script src="https://unpkg.com/@movigo/core"></script> <!-- Required dependency -->
  <script src="https://unpkg.com/@movigo/drawer"></script>

Usage

Drawer plugin allows you to animate sidebars by creating a slide effect and obscuring the background container.

It is necessary to select a sidenav as target, and optionally the background container if you want to obscure it.

You can define width, position, duration and easing function of the sidenav. In addition, you can specify whether to open or close the sidenav and you can define the background brightness.

  const sidenav = document.querySelector('.sidenav')
  const container = document.querySelector('.container')

  movigo.target([sidenav, container]).drawer({
    leftSide: false, // Defines the sidenav position: left or right (default: true)
    open: false, // To close or open the sidenav (default: true)
    width: 300, // Width of the sidenav (default: 200)
    duration: .5, // Animation duration (default: .3 on opening, 0.25 on closing)
    easing: 'linear', // Easing function (default: ease-in-out)
    backdropBrightness: 70 // Backdrop container brightness in % (default: 60)
  }).animate()

It's important to define some CSS properties in the sidenav to work correctly:

  <style>
    .container {
      position: relative;
    }

    .sidenav {
      z-index: 999;
      position: absolute; /* Or fixed for fullscreen sidenav */
      width: 0;
      height: 100%;
      overflow-x: hidden;
    }
  </style>

  <div class="container">
    <button onclick="openSidenav()"></button>
      <div class="sidenav">
        Sidenav
      </div>
  </div>

:chart_with_upwards_trend: Development

:scroll: Rules

Commits

  • Use this commit message format (angular style):

    [<type>] <subject> <BLANK LINE> <body>

    where type must be one of the following:

    • feat: A new feature
    • fix: A bug fix
    • docs: Documentation only changes
    • style: Changes that do not affect the meaning of the code
    • refactor: A code change that neither fixes a bug nor adds a feature
    • test: Adding missing or correcting existing tests
    • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
    • update: Update of the library version or of the dependencies

and body must be should include the motivation for the change and contrast this with previous behavior (do not add body if the commit is trivial).

  • Use the imperative, present tense: "change" not "changed" nor "changes".
  • Don't capitalize first letter.
  • No dot (.) at the end.

Branches

  • There is a master branch, used only for release.
  • There is a dev branch, used to merge all sub dev branch.
  • Avoid long descriptive names for long-lived branches.
  • No CamelCase.
  • Use grouping tokens (words) at the beginning of your branch names (in a similar way to the type of commit).
  • Define and use short lead tokens to differentiate branches in a way that is meaningful to your workflow.
  • Use slashes to separate parts of your branch names.
  • Remove branch after merge if it is not important.

Examples:

git branch -b docs/README
git branch -b test/one-function
git branch -b feat/side-bar
git branch -b style/header

:page_facing_up: License

:telephone_receiver: Contacts

:boy: Developers

Cedoor