
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@xss-shared-library/uicomponent
Advanced tools
This library provides reusable UI components for Angular applications. It includes components like toast notifications and loading indicators, designed to enhance user experience and streamline UI development.
This library provides reusable UI components for Angular applications. It includes components like toast notifications and loading indicators, designed to enhance user experience and streamline UI development.
To install the library, run the following command:
npm install @xss-shared-library/uicomponent
Add the required modules to your Angular application's module:
import { XSSToastModule } from '@xss-shared-library/uicomponent';
import { XSSLoadingModule } from '@xss-shared-library/uicomponent';
@NgModule({
imports: [
XSSToastModule,
XSSLoadingModule
]
})
export class AppModule { }
Use the ToastService to display toast messages in your components:
import { Component } from '@angular/core';
import { ToastService } from '@xss-shared-library/uicomponent';
@Component({
selector: 'app-root',
template: `<app-toast></app-toast>` // Add the toast component to your template
})
export class AppComponent {
constructor(private toastService: ToastService) {}
showSuccessMessage() {
this.toastService.showSuccess('Operation completed successfully!');
}
}
Use the LoadingService to show or dismiss loading dialogs:
import { Component } from '@angular/core';
import { LoadingService } from '@xss-shared-library/uicomponent';
@Component({
selector: 'app-root',
template: `<app-loading></app-loading>` // Add the loading component to your template
})
export class AppComponent {
constructor(private loadingService: LoadingService) {}
startLoading() {
this.loadingService.showLoading();
}
stopLoading() {
this.loadingService.dismissLoading();
}
}
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.
This library is licensed under the MIT License. See the LICENSE
file for more details.
For more help with the Angular CLI, use ng help
or check out the Angular CLI Overview and Command Reference page.
FAQs
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
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.