angular / components

Component infrastructure and Material Design components for Angular
https://material.angular.io
MIT License
24.35k stars 6.74k forks source link

Standalone SideNav #15967

Open andreElrico opened 5 years ago

andreElrico commented 5 years ago

Please describe the feature you would like to request.

Add a component mat-sidenav-standalone that can just be dropped anywhere into an existing project that directly adds a SideNav to it.

What is the use-case or motivation for this proposal?

I have a running project and wanted to make the navigation more responsive. So I wanted to add a sideNav when a specific width is found.

Using the sideNav with its current API required me to add 3/4 of my app into the <mat-sidenav-content> definitely not what I want, esp since the sideNav should only exist when the screen size is less that "X"px.

I understand that methods mode="push" require the content to be in <mat-sidenav-content>.

Here in this STACKBLITZ I have programmed a workaround that requires some CSS-wizardry as you will see.

Yet I dont know how I could add my standalone SideNav into a standalone component, so that I have the same UX.

Update - refactored sidenav into standalone component.

Stackblitz 2.0

angular-robot[bot] commented 2 years ago

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] commented 2 years ago

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.