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

ngx-aside-ease

v0.0.1

Published

ngx-aside-ease is an Angular library that offers a lightweight, performant, and responsive aside panel. This library has multiple options and offers a good user experience.

Downloads

2

Readme

ngx-aside-ease

Description

ngx-aside-ease is an Angular library that offers a lightweight, performant, and responsive aside panel. This library has multiple options and offers a good user experience.

Support Angular version starts at v17.

Demo

Live demonstration of the ngx-aside-ease library here.

Installation

You can install the library using the following command:

npm i ngx-aside-ease

Import the stylesheet in your styles.css: @import "../node_modules/ngx-aside-ease/src/lib/aside/aside.css";

Add the AsideModule to your module or standalone component.

Usage

This library contains two components and directives to add in the template:

<ngx-aside-container>
  <ngx-aside>
    <h3 ngxTitle>ngx-aside-ease</h3>
    <div ngxCategory>
      <p>general</p>
      <i class="..."></i>
    </div>
    <div ngxCategory>
      <p>preferences</p>
      <i class="..."></i>
    </div>
    <div ngxCategory>
      <p>performant</p>
      <i class="..."></i>
    </div>
    <div ngxCategory [defaultActive]="true">
      <p>responsive</p>
      <i class="..."></i>
    </div>
    <div ngxCategory>
      <p>controlable</p>
      <i class="..."></i>
    </div>
  </ngx-aside>

  <!-- HERE THE CONTENT OF THE PAGE -->
  <section class="content-page">
    <!-- ... -->
  </section>
</ngx-aside-container>

The components contain following options:

| Selector | Option | Default | Description | | ------------------- | ---------------------- | ------------- | --------------------------------------------------------------------------------- | | ngx-aside-container | reverse | false | Reverse the panel, setting it on the right of the page. | | ngx-aside | minVisible | 30 | The minimum visible panel width in pixels, triggered by a method (not manually). | | ngx-aside | minWidth | 250 | The minimum panel width in pixels by dragging (Mouse or Touch event). | | ngx-aside | width | 300 | The width of the panel in pixels. | | ngx-aside | maxWidth | 50 | The maximum width of the panel in viewport width (vw) by dragging. | | ngx-aside | responsiveBreakpoint | 800 | The responsive breakpoint in pixels under which the responsive mode is triggered. | | ngx-aside | displayCollapsableIcon | true | Display the icon to collapse the panel. | | ngx-aside | asideAnimationTiming | 0.3s ease-out | The panel animation shorthand CSS. | | ngx-aside | enableResize | true | Enable manual resize of the panel. | | ngx-aside | resizerColor | #0095be | Define the color of the resizer on hover. | | ngx-aside | enableMarker | true | Enable the marker on the active element. | | ngx-aside | markerColor | gold | Define the color of the marker. | | ngx-aside | markerAnimationTiming | 0.3s ease-out | The marker animation shorthand CSS. | | ngx-aside | storePreference | true | Store the resize preference of the user in localStorage. | | ngx-aside | updateUrl | true | Update the URL with the active selection. | | ngx-aside | paramUrlName | name | Set the name of the parameter in the URL. Example: ?name=selection. |

The ngxTitle directive is to place on your title (if any) and ngxCategory directive on your items.

| Directive | Option | Default | Description | | --------- | ------------- | ------- | ---------------------------- | | ngxTitle | defaultActive | false | Set the default active item. | | ngxTitle | disable | false | Disable the item. |

AsideService

This library exposes an AsideService which contains following method/property:

// toggle panel visibility, partially or totally*
this.asideService.toggleVisibility();

// RxJs Subject triggered on selection change
onSelectionChange = new Subject<HTMLElement>();

// Usage
this.asideService.onSelectionChange.subscribe((item) => {
  // returns the item that has been selected
});

*The panel will either open partially or totally, depending on the responsive breakpoint set. The responsive breakpoint is set to 800px by default. Under 800px, triggering this method will either totally display/hide the panel. Above this threshold, the panel will be partially opened/hidden.

Responsive

This library is responsive and will automatically hide/display the panel according to the option responsiveBreakpoint.

Style customisation

If you want to override any default styles, add ViewEncapsulation.None to the hosting component and override existing classes (inspect the DOM to find the corresponding classes). This library automatically adds an styleless active class on the active element, so you can style the active element in your hosting component.

Following modifies the background and the color of the aside panel:

.ngx-aside-wrapper {
  background: linear-gradient(to bottom, rgb(0, 0, 155), #000311);
  color: #fff;
}

Classes have been prefixed with ngx-*.

Change log

Report a Bug

Please provide a detailed description of the encountered bug, including your options and the steps/actions that led to the issue. An accurate description will help me to reproduce the issue.

Ngx-ease serie

You like this library? Discover the ngx-ease serie here.