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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mg-sidebar

v0.0.6

Published

Biblioteca gerada com [Angular CLI](https://github.com/angular/angular-cli) version 12.1.0.

Downloads

1

Readme

MgSidebar

apresentação

Biblioteca gerada com Angular CLI version 12.1.0.

clique aqui para ir a página de exemplo

Início Rápido

importe a biblioteca

app.module.ts

import { MgSidebarModule } from "mg-sidebar";


@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    MgSidebarModule.forRoot(),
    NgbModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.ts

import { InterfaceMenuList } from "sidebar";

/**     PARA CONFORTO APRESENTO A INTERFACE DE ENTRADA
    
     interface InterfaceMenuList {
        url?: string,
        nome: string,
        icon: string,
        subMenu?: InterfaceMenuList[]
     }
 
 */

export class AppComponent {
  menuList: InterfaceMenuList[] = [
    {url: '/', nome: 'Dashboard', icon: 'settings'},
    {
      nome: 'Dropdown', url: '/usuarios', icon: 'settings', subMenu: [
        {url: '/usuarios', nome: 'usuarios', icon: 'settings'}
      ]
    }
  ];
//...
}

app.component.html

<mg-sidebar
    #sideBar
    logoSm="/link_da_sua_logo.jpeg"
    logoMarca="/link_da_sua_logo_escrita.png"
    [menuList]="menuList"
></mg-sidebar>

Maximizar e minimizar sideBar

O controle de apresentação conta com a sua base em sessionStorag, sua alteração pode ser realizada pela variavel exportada pelo html ou por meio de um evento.

<!-- variavel HTML -->
<button (click)="sideBar.changeOpen()">open/close</button>
<!-- emissão de evento -->
<button (click)="click()">open/close</button>
function click() {
  window.dispatchEvent(new CustomEvent('openMgSidebar'));
}

Alterando estilos

Para alterar estilos, como cores e tamanhos. Utilize o forRoot() existente em app.module alterando apenas os dados que deseja modificar.

A apresentação irá mostrar os valores padrões existentes na biblioteca

const config = {
  customColors: {
  activeBackgroundColor: 'rgba(255, 255, 255, .2)',
  menuItemHover: 'rgba(255, 255, 255, .2)',
  textColor: 'white',
  iconColor: 'white',
  background: 'blue'
  },
  customSize: {
    maximizado: '260px',
    minimizado: '80px',
    fontSizeItemMenu: '16px',
    fontSizeIconMenu: '20pt',
    fontIconDropdownMenu: '13pt'
  },
  backgroungImage: undefined
};

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    MgSidebarModule.forRoot(config),
    NgbModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})

Background Imagem

Perceba que o background imagem é por padrão desativado, para ativalos use a seguinte estrutura

  • corPelicula - representa a camada de cor sobre a imagem, isso ajudará na leitura dos dados e sobreposição mais adequada do background.
const config = {
  backgroungImage: {
    image: 'link_ou_base64_da_imagem.png',
    corPelicula: 'rgba(0, 0, 0, .8)'
  }
};

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    MgSidebarModule.forRoot(config),
    NgbModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})