Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

angular-material-rail-drawer

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-material-rail-drawer

**Package Name:** [angular-material-rail-drawer](https://npmjs.com/package/angular-material-rail-drawer)

  • 3.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-15.57%
Maintainers
1
Weekly downloads
 
Created
Source

⚠️ DEPRECATION NOTICE ⚠️

Package Name: angular-material-rail-drawer


🚫 Reasons for Discontinuation:

  1. Legacy Support Only: This package is designed to work only with Material Legacy (pre-version 17).
  2. No Support for Angular V17: There are little to no plans to support Angular V17. The new syntax of Angular V17 is not favored, and it's believed that the changes are detrimental to the framework.

📣 Personal Note:

I personally dislike the new syntax introduced in Angular V17. I believe the direction Angular is taking with this version is not in the best interest of the framework. As a result, I have decided not to continue supporting or maintaining this package.


📌 Recommendations:

  • If you are using an older version of Angular (pre-version 17), you may continue using this package. However, be aware that no further updates or support will be provided.
  • For projects using Angular V17 and above, it's recommended to look for alternative packages or solutions.

Angular Material Rail Drawer Plugin

Angular Material Navigation drawer — Adding support mode = “Rail” (mini variant behaviour)

Since 2016, the Angular community has been shouting out of a mini variant for material design.

How to install

NPM: npm i angular-material-rail-drawer Yarn: yarn add angular-material-rail-drawer

How to use

Read example for more information

module.ts import { DrawerRailModule } from 'angular-material-rail-drawer';

component.html <mat-sidenav mode="rail" opened="true">

If "strictTemplates": true is activated in tsconfig.json, overwriting mode is not possible. In this case you can use the following selector:

component.html <mat-sidenav rail-mode opened="true">

This extension adds on an existing mode the Material documentation remains the same.

Extra API for rail variant

On top of all the standard Drawer API from google https://material.angular.io/components/sidenav/api. I've added 4 extra API so you have more control over the animation and size.

Inputdescriptiondefault
openAnimationAngular Animation settings for openingsidebarOpen(maxWidth)
closeAnimationAngular Animation settings for closingsidebarClose(minWidth)
closeWidthmin width (small view)"60px"
expandedWidthmax width for the expanded view"200px"

extra note the default animation time is set to 100ms

Notes: Angular material open state

Close === mini & Opened === expanded

Blog post: https://medium.com/@LostDeveloper/angular-material-navigation-drawer-adding-support-mode-rail-mini-variant-behaviour-8f7b107700b3

Angular material mini variant github issue: https://github.com/angular/components/issues/1728

FAQs

Package last updated on 03 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc