All Projects → codica2 → simple-sidenav

codica2 / simple-sidenav

Licence: other
Simple, easily customizable, animated menu.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to simple-sidenav

React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (+287.5%)
Mutual labels:  navigation, menu
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+6655%)
Mutual labels:  navigation, menu
Hc Offcanvas Nav
JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
Stars: ✭ 201 (+402.5%)
Mutual labels:  navigation, menu
Quickmenu
The new era of mobile navigation for the web, we're out of hamburgers.
Stars: ✭ 119 (+197.5%)
Mutual labels:  navigation, menu
Accordion
Silky-smooth accordion widgets with no external dependencies.
Stars: ✭ 32 (-20%)
Mutual labels:  navigation, menu
React Command Palette
An accessible browser compatible javascript command palette
Stars: ✭ 140 (+250%)
Mutual labels:  navigation, menu
Dropdownmenukit
UIKit drop down menu, simple yet flexible and written in Swift
Stars: ✭ 246 (+515%)
Mutual labels:  navigation, menu
Promotion Menu
RubyMotion gem allowing you to easily setup a facebook or Path style hidden slide menu easily with the ProMotion gem.
Stars: ✭ 78 (+95%)
Mutual labels:  navigation, menu
navigator
🧿 Build navigation or menu for Laravel and Awes.io. Unlimited complexity and depth, with permissions and sorting support.
Stars: ✭ 47 (+17.5%)
Mutual labels:  navigation, menu
SidebarOverlay
Yet another implementation of sidebar menu, but here your menu appears over the top view controller.
Stars: ✭ 66 (+65%)
Mutual labels:  navigation, menu
Draggablemenu
A draggable menu that shows a thumbnail preview of an image grid
Stars: ✭ 117 (+192.5%)
Mutual labels:  navigation, menu
priority-plus
A modern implementation of the priority plus navigation pattern.
Stars: ✭ 30 (-25%)
Mutual labels:  navigation, menu
Pushy
Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions.
Stars: ✭ 1,488 (+3620%)
Mutual labels:  navigation, menu
Layerjs
layerJS: Javascript UI composition framework
Stars: ✭ 1,825 (+4462.5%)
Mutual labels:  navigation, menu
Bootstrap Dropdown Hover
Bootstrap based responsive mulltilevel dropdown navigation menu with fascinating animations
Stars: ✭ 115 (+187.5%)
Mutual labels:  navigation, menu
Mmenu Js
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.
Stars: ✭ 2,535 (+6237.5%)
Mutual labels:  navigation, menu
React Responsive Navbar
Nothing crazy, nothing flashy, just a simple, flexible & completely customisable responsive navigation bar component.
Stars: ✭ 42 (+5%)
Mutual labels:  navigation, menu
Eeh Navigation
An AngularJS menu module.
Stars: ✭ 74 (+85%)
Mutual labels:  navigation, menu
vue-bottom-navigation
Vue bottom navigation
Stars: ✭ 56 (+40%)
Mutual labels:  navigation, menu
bsnav
An extended Bootstrap 4 menu with a bunch of utilities
Stars: ✭ 90 (+125%)
Mutual labels:  navigation, menu

Simple sidenav

Simple sidenav is a simple, easily customizable, animated menu, with the possibility of infinite nesting that was built specifically for Angular apps.

Demos

Installation

npm install simple-sidenav --save

Usage

Module

# app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { SimpleSidenavModule } from 'simple-sidenav';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    SimpleSidenavModule,
    BrowserAnimationsModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

Component

# app.component.ts
import { Component } from '@angular/core';
import { SimpleMenu } from 'simple-sidenav';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  menu: SimpleMenu[] = [...];
  animation: SimpleAnimation = {
    in: { value: 'slide-in-stagger' },
    out: { value: 'slide-out', duration: 200 }
  };

  onClick(item: {id: number|string, name: string, icon: string, index: number}) {
    ...
  }
}

HTML

# app.component.html
<sm-simple-sidenav
  [menu]="menu"
  [activeID]="'2'"
  [animation]="animation"
  [withArrow]="true"
  (onSidenav)="onClick($event)">
</sm-simple-sidenav>

[menu] prop example:

menu: SimpleMenu[] = [
  { "id": "1", "name": "Ruby on Rails", "icon": "assets/images/rails.png", "menu": [
    { "id": "1", "name": "Models", "menu": [
      { "id": "1", "name": "Active Record Basics" },
      { "id": "2", "name": "Active Record Migrations" },
      { "id": "3", "name": "Active Record Validations" },
      { "id": "4", "name": "Active Record Callbacks" },
      { "id": "5", "name": "Active Record Associations" },
      { "id": "6", "name": "Active Record Query Interface", "menu": [...] }
    ] },
    ] },
  { "id": "2", "name": "Angular", "icon": "assets/images/angular.png", "menu": [...] },
  ...
]

NOTE: id must be unique, an icon is optional, a menu can contain an infinite level of nested menu

[activeID] prop example:

If you want menu to be opened by default at some position just pass an id of menu item to [activeID] prop.

[activeID]="'yourMenuItemID'"

[animation] prop example:

We have two types of animation, in and out. Value is a name of animation. Duration is an optional parameter that shows how long the animation should work.

For in: we have two animations for choice slide-in | slide-in-stagger.

For out: just one slide-out.

{
  "in": { "value": "slide-in-stagger" },
  "out": { "value": "slide-out", "duration": "200" }
}

If you don’t want any animations - just pass false into [animation]="false"

API

Props Default value Interface Description Required
[menu] none SimpleMenu[] See example above. true
[animation] false SimpleAnimation Pass object with animation name. See example above. false
(onSidenav) ---- -------- Pass callback function to listen for sidenav clicks. $event contains an id and index of the clicked element. false
[animate] false boolean Set to true if you want to animate the first appearance of the sidenav. false
[withArrow] true boolean Set to false if you want to hide an arrow icon. false
[activeID] none string Pass an ID of menu item if you want it to be opened by default. false

License

Simple sidenav is Copyright © 2015-2018 Codica. It is released under the MIT License.

About Codica

Codica logo

Simple sidenav is maintained and funded by Codica. The names and logos for Codica are trademarks of Codica.

We love open source software! See our other projects or hire us to design, develop, and grow your product.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].