{"id":19435356,"url":"https://github.com/topaxi/angular-dropdown","last_synced_at":"2025-04-24T20:32:31.833Z","repository":{"id":17068769,"uuid":"80210998","full_name":"topaxi/angular-dropdown","owner":"topaxi","description":"Simple angular dropdown component","archived":false,"fork":false,"pushed_at":"2022-12-10T20:28:18.000Z","size":1630,"stargazers_count":5,"open_issues_count":26,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T14:31:35.568Z","etag":null,"topics":["angular","angular2","dropdown"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/topaxi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-27T13:48:53.000Z","updated_at":"2023-04-05T20:05:36.000Z","dependencies_parsed_at":"2023-01-14T07:46:10.314Z","dependency_job_id":null,"html_url":"https://github.com/topaxi/angular-dropdown","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaxi%2Fangular-dropdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaxi%2Fangular-dropdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaxi%2Fangular-dropdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topaxi%2Fangular-dropdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topaxi","download_url":"https://codeload.github.com/topaxi/angular-dropdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250704956,"owners_count":21473789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","angular2","dropdown"],"created_at":"2024-11-10T15:05:50.330Z","updated_at":"2025-04-24T20:32:31.518Z","avatar_url":"https://github.com/topaxi.png","language":"TypeScript","readme":"# Angular Dropdown\n\nA simple angular dropdown component\n\n## Installation\n\n```bash\n$ yarn add angular-dropdown ng-wormhole\n```\n\nImport `AngularDropdownModule` in your app:\n\n```typescript\nimport { NgModule } from '@angular/core';\nimport { AngularDropdownModule } from 'angular-dropdown';\n\n@NgModule({\n  imports: [AngularDropdownModule]\n})\nexport class AppModule {}\n```\n\nIn your SASS stylesheet:\n\n```scss\n@import '~angular-dropdown/styles';\n```\n\n### Example usage\n\n```html\n\u003cdiv ngDropdown\u003e\n  \u003cbutton ngDropdownControl\u003eOpen Dropdown!\u003c/button\u003e\n  \u003cdiv ngDropdownContent dropdownClass=\"slide-fade\"\u003e\n    \u003cul\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eDropdown Item 1\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eDropdown Item 2\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eDropdown Item 3\u003c/a\u003e\u003c/li\u003e\n      \u003cli\u003e\u003ca href=\"#\"\u003eDropdown Item 4\u003c/a\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## ngDropdown\n\n### Inputs\n\n_renderInPlace: boolean = false_\nShould the component render its children in place?\n\n```html\n\u003cdiv ngDropdown [renderInPlace]=\"true\"\u003e\n  \u003cbutton ngDropdownControl\u003eOpen Dropdown!\u003c/button\u003e\n  \u003cdiv ngDropdownContent\u003e\n    ...\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n_calculatePosition: (trigger: Element, dropdown: Element, options: any) =\u003e any_\nOverwrite the default calculatePosition function\n\n_calculateInPlacePosition: (trigger: Element, dropdown: Element, options: any) =\u003e any_\nOverwrite the default calculatePosition function used when dropdown is\nrendered in-place.\n\n_disabled: boolean = false_\nDisable the dropdown\n\n_beforeOpen: () =\u003e boolean = null_\nHook before the dropdown is opened, return false to cancel it.\n\n_beforeClose: () =\u003e boolean = null_\nHook before the dropdown is closed, return false to cancel it.\n\n_verticalPosition: 'auto' | 'above' | 'below'_\nVertical positioning\n\n_horizontalPosition: 'auto' | 'right' | 'center' | 'left'_\nHorizontal positioning\n\n### Outputs\n\n_open: void_\nTriggers when opening the dropdown\n\n```html\n\u003cdiv ngDropdown (open)=\"doSomething()\"\u003e\n  \u003cbutton ngDropdownControl\u003eOpen Dropdown!\u003c/button\u003e\n  \u003cdiv ngDropdownContent\u003e\n    ...\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n_close: void_\nTriggers when closing the dropdown\n\n```html\n\u003cdiv ngDropdown (close)=\"doSomething()\"\u003e\n  \u003cbutton ngDropdownControl\u003eOpen Dropdown!\u003c/button\u003e\n  \u003cdiv ngDropdownContent\u003e\n    ...\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Programatically open/close\n\n```html\n\u003cdiv ngDropdown #dropdown=\"ngDropdown\"\u003e\n  \u003cbutton (click)=\"ngDropdown.open()\"\u003eOpen Dropdown!\u003c/button\u003e\n  \u003cbutton (click)=\"ngDropdown.close()\"\u003eClose Dropdown!\u003c/button\u003e\n\n  \u003cdiv ngDropdownContent\u003e\n    ...\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\n## ngDropdownContent\n\n### Inputs\n\n_dropdownClass: string_\nClass to apply on the dropdown element, classes with animations will be\nproperly animated.\n\n_transitioningInClass: string = 'ng-dropdown-content--transitioning-in'_\nClass which will be applied when the dropdown element is inserted into the DOM.\n\n_transitionedInClass: string = 'ng-dropdown-content--transitioned-in'_\nClass which will be applied once the transitioningInClass animation finished.\n\n_transitioningOutClass: string = 'ng-dropdown-content--transitioning-out'_\nClass which will be applied when closing the dropdown.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n\n# Credits\n\nThis component is heavily inspired by\n[ember-basic-dropdown](https://github.com/cibernox/ember-basic-dropdown).\nContributions from @cibernox, @locks and others.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopaxi%2Fangular-dropdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopaxi%2Fangular-dropdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopaxi%2Fangular-dropdown/lists"}