npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kit-ng-ui/alert

v0.1.0

Published

Kit UI Alert component — inline / banner notice with type icons, description, action, and close button.

Downloads

78

Readme

@kit-ng-ui/alert

Inline / banner notice for Kit UI. Mirrors ant-design's Alert.

Install

pnpm add @kit-ng-ui/alert @kit-ng-ui/core @kit-ng-ui/icons

Styles

// app styles.scss
@use '@kit-ng-ui/core/styles' as *;
@use '@kit-ng-ui/alert/styles' as alert;

Use

import { Component } from '@angular/core';
import { KitAlertComponent } from '@kit-ng-ui/alert';

@Component({
  standalone: true,
  imports: [KitAlertComponent],
  template: `
    <!-- Basic -->
    <kit-alert type="success" message="Saved." />

    <!-- With description + icon + close -->
    <kit-alert
      type="warning"
      message="Heads-up"
      description="Your session expires in 5 minutes."
      showIcon
      closable
      (close)="onClose($event)"
    />

    <!-- Banner mode -->
    <kit-alert type="info" banner message="Read-only mode" />

    <!-- Action slot -->
    <kit-alert type="error" message="Network is down." [actionTpl]="retry" />
    <ng-template #retry><button>Retry</button></ng-template>
  `,
})
export class Demo {
  onClose(event: MouseEvent) {
    // call event.preventDefault() to keep the alert mounted
  }
}

API

<kit-alert>

| Input | Type | Default | Description | | ---------------- | ------------------------------------------------------ | -------- | ---------------------------------------------------------------------------- | | actionTpl | TemplateRef \| null | null | Trailing slot for an action button or link. | | banner | boolean | false | Banner mode — full-width, no horizontal border, no rounded corners. | | closable | boolean | false | Render the close button. | | closeAriaLabel | string | 'Close'| Native aria-label for the close button. | | closeText | string \| null | null | Replaces the × icon with text inside the close button. | | closeTextTpl | TemplateRef \| null | null | Template equivalent of [closeText]. | | description | string \| null | null | Long-form description. | | descriptionTpl | TemplateRef \| null | null | Template equivalent of [description]. | | icon | string \| null | null | Override the leading icon (from the kit-icon registry). | | iconTpl | TemplateRef \| null | null | Custom leading-icon template. Wins over [icon]. | | message | string \| null | null | Short headline. | | messageTpl | TemplateRef \| null | null | Template equivalent of [message]. | | showIcon | boolean | false | Show the leading status icon. | | type | 'success' \| 'info' \| 'warning' \| 'error' | 'info' | Visual + semantic type. Sets background, border, and default icon color. |

| Output | Type | Description | | ------- | -------------------------- | --------------------------------------------------------------------------------- | | close | EventEmitter<MouseEvent> | Fires before the alert is hidden. Call preventDefault() on the event to keep it visible. |

Behavior notes

  • role="alert" is always applied. Inserting an alert into the DOM announces it to assistive tech; do not toggle it via CSS display: none if you want it announced.
  • Default icon is type-driven: check-circle for success, info for info, exclamation-circle for warning, error for error. Override via [icon] or [iconTpl].
  • Closable is uncontrolled — clicking the close button hides the alert and fires (close) then (afterClose). For a controlled form, keep the alert mounted only when a parent signal is true.
  • Banner mode is meant for page-level read-only / draft-mode / staging-environment indicators. Use it sparingly — a banner per page max.