All Projects → Gbuomprisco → ng2-material-dropdown

Gbuomprisco / ng2-material-dropdown

Licence: MIT license
Angular 2 Material-like Dropdown Component

Programming Languages

typescript
32286 projects
HTML
75241 projects
SCSS
7915 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ng2-material-dropdown

Material
A lightweight Material Design library for Angular based on Google's Material Components for the Web.
Stars: ✭ 143 (+276.32%)
Mutual labels:  material-components, angular-components
Dejajs Components
Angular components
Stars: ✭ 37 (-2.63%)
Mutual labels:  material-components, angular-components
Material Admin
Free Material Admin Template
Stars: ✭ 219 (+476.32%)
Mutual labels:  material-components
spinners-angular
Lightweight SVG/CSS spinners for Angular
Stars: ✭ 21 (-44.74%)
Mutual labels:  angular-components
ngx-sortable
ngx-sortable is an angular sortable list components that support drag and drop sorting
Stars: ✭ 19 (-50%)
Mutual labels:  angular-components
Grocy Android
ERP beyond your fridge, now on your phone – An awesome companion app for Grocy
Stars: ✭ 227 (+497.37%)
Mutual labels:  material-components
ng2-expansion-panels
Expansion Panels component for Angular 2
Stars: ✭ 19 (-50%)
Mutual labels:  angular-components
React Material Components Web
React wrapper of Google's Material Components Web
Stars: ✭ 184 (+384.21%)
Mutual labels:  material-components
g2-angular
Angular for Alipay G2
Stars: ✭ 27 (-28.95%)
Mutual labels:  angular-components
ngx-mat-timepicker
A true material timepicker
Stars: ✭ 45 (+18.42%)
Mutual labels:  angular-components
Photos
No description or website provided.
Stars: ✭ 74 (+94.74%)
Mutual labels:  material-components
ngx-wall
Helps build content editor for note-taking application
Stars: ✭ 78 (+105.26%)
Mutual labels:  angular-components
Materialbanner
A library that provides an implementation of the banner widget from the Material design.
Stars: ✭ 241 (+534.21%)
Mutual labels:  material-components
KotLink
An implementation of Go-Links, written in Kotlin
Stars: ✭ 37 (-2.63%)
Mutual labels:  material-components
Material Backdrop
A simple solution for implementing Backdrop pattern for Android
Stars: ✭ 221 (+481.58%)
Mutual labels:  material-components
angular-dual-listbox
Angular 10 component for a dual listbox control.
Stars: ✭ 78 (+105.26%)
Mutual labels:  angular-components
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+476.32%)
Mutual labels:  material-components
react-native-button-toggle-group
An animated button toggle group for React Native
Stars: ✭ 44 (+15.79%)
Mutual labels:  material-components
doodle-android
Colorful live wallpapers with auto dark mode and power-efficient animations
Stars: ✭ 440 (+1057.89%)
Mutual labels:  material-components
stream-chat-angular
💬 Angular Chat SDK ➜ Stream Chat. Build a chat app with ease.
Stars: ✭ 23 (-39.47%)
Mutual labels:  angular-components

Angular2 Dropdown Component

Material-like dropdown component for Angular2.

NB: This repository is currently unmaintained. Please fork or use Angular Material's module, it's better.

Install

npm install ng2-material-dropdown --save

Usage

Once installed, import the directives and use it them your container component:

<ng2-dropdown>
    <ng2-dropdown-button>
        Open Menu
    </ng2-dropdown-button>
    <ng2-dropdown-menu>
        <ng2-menu-item *ngFor="let page of pages">
            {{ page }}
        </ng2-menu-item>

        <div class='ng2-menu-divider'></div>

        <ng2-menu-item>
            With Divider
        </ng2-menu-item>
    </ng2-dropdown-menu>
</ng2-dropdown>
// import module
import { Ng2DropdownModule } from 'ng2-material-dropdown';

@NgModule({
    imports: [ Ng2DropdownModule ]
    // ..
})
export class MyModule {}

API

ng2-dropdown

  • dynamicUpdate - [?boolean] : option to disable the dynamic update of the position on scroll events (defaults to true)
  • onItemSelected() - [(onItemSelected($event)] : event that emits the currently selected/hovered item
  • onItemClicked() - [(onItemClicked($event)] : event that emits the item clicked on
  • onShow() - [(onItemClicked($event)] : event that emits when the dropdown gets shown
  • onHide() - [(onItemClicked($event)] : event that emits when the dropdown gets hidden

ng2-dropdown-menu

  • focusFirstElement - [?boolean] : by default the first element is immediately focused. You can disable by setting this option to false
  • width - [?number]: this determines the width of the menu. Possible values are 2, 4 and 6. By default, this is set to 4
  • offset - [?string]: offset to adjust the position of the dropdown with absolute values
  • appendToBody - [?boolean] : by default the dropdown is appended to the body, but you can disable this by setting it to false

ng2-dropdown-button

  • showCaret - [?boolean] : if present, a caret will be appended to the button's text

ng2-menu-item

  • preventClose - [?boolean] : if present, this attribute prevents the menu to hide when the menu item is clicked
  • value - [?any] : any value that you may want to attach to a menu item. Useful for using this component with other components.
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].