Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
angular-weblineindia-dropdown
Advanced tools
An Angular-based Dropdown component for selecting options from a list.
Readme
An Angular-based Dropdown component for selecting options from a list.
83.0 ✔ | 77.0 ✔ | 13.1.1 ✔ | 83.0 ✔ | 11.9 ✔ |
Install the npm package:
npm install angular-weblineindia-dropdown
#OR
yarn add angular-weblineindia-dropdown
Use the <angular-weblineindia-dropdown>
component:
Add in app.module.ts file
import { NgModule } from "@angular/core";
import { AngularWeblineindiaDropdownModule } from 'angular-weblineindia-dropdown';
@NgModule({
imports: [AngularWeblineindiaDropdownModule],
})
export class AppModule {}
Add in app.component.ts file
selectedOption: any;
dropdownOptions: any[] = [
{ id: '1', name: 'Option 1' },
{ id: '2', name: 'Option 2' },
{ id: '3', name: 'Option 3' },
];
onOptionSelect(option: any) {
console.log('Selected option:', option.target.value);
}
onFocusDropdown(event: any) {
console.log('Dropdown focused', event);
}
onBlurDropdown(event: any) {
console.log('Dropdown blurred', event);
}
}
Add in app.component.html file
<angular-weblineindia-dropdown
[placeHolder]="'Please select'"
[options]="dropdownOptions"
[dropdownClass]="'custom-dropdown'"
[dropdownListClass]="'custom-dropdown-list'"
[disabled]="false"
[value]="'2'"
(change)="onOptionSelect($event)"
(focus)="onFocusDropdown($event)"
(blur)="onBlurDropdown($event)"
></angular-weblineindia-dropdown>
Add in app.component.css file
::ng-deep .custom-dropdown {
/* Add your custom styles for the dropdown here */
}
::ng-deep .custom-dropdown-list {
/* Add your custom styles for the dropdown list here */
}
Prop | Type | Default | Description |
---|---|---|---|
placeholder | String | The placeholder text for the input field | |
options | Array | Array of options for the dropdown | |
dropdownClass | String | CSS class for the dropdown container | |
dropdownListClass | String | CSS class for the dropdown list | |
disabled | Boolean | Specifies if the dropdown is disabled | |
value | string | Selected option for the dropdown |
Name | Description |
---|---|
focus | Gets triggered when the dropdown input field receives focus. |
blur | Gets triggered when the dropdown input field loses focus. |
change | Gets triggered when the selected option(s) in the dropdown change. |
We have built many other components and free resources for software development in various programming languages. Kindly click here to view our Free Resources for Software Development
Detailed changes for each release are documented in CHANGELOG.md.
angular-weblineindia-dropdown, dropdown, input, angular, angular-component, dropdown-component, dropdown-box, dropdown-box-input
FAQs
An Angular-based Dropdown component for selecting options from a list.
The npm package angular-weblineindia-dropdown receives a total of 11 weekly downloads. As such, angular-weblineindia-dropdown popularity was classified as not popular.
We found that angular-weblineindia-dropdown demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.