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

@fvc/alert

v1.2.3

Published

`@fvc/alert` provides FE-VIS styled alert primitives on top of Ant Design Alert. It keeps the Ant Design Alert API familiar while adding automatic type-based icon selection, size variants, full-width layout, and custom icon colour control.

Readme

@fvc/alert

@fvc/alert provides FE-VIS styled alert primitives on top of Ant Design Alert. It keeps the Ant Design Alert API familiar while adding automatic type-based icon selection, size variants, full-width layout, and custom icon colour control.

Installation

bun add @fvc/alert

Peer Dependencies

bun add react antd @fvc/icons

Import

import { Alert } from '@fvc/alert';

Quick Start

import { Alert } from '@fvc/alert';

export function SaveSuccess() {
  return <Alert type="success" message="Record saved successfully" />;
}

Variants

| Type | Use case | | --- | --- | | 'info' | General information — gray background. | | 'success' | Successful operation — green background. | | 'warning' | Attention required — orange background. | | 'error' | Critical error — red background. |

Common Usage

Types

<Alert type="info" message="Your session expires in 10 minutes" />
<Alert type="success" message="Record saved successfully" />
<Alert type="warning" message="This action cannot be undone" />
<Alert type="error" message="Failed to load data. Please try again" />

Sizes

<Alert type="info" message="Medium alert (default)" size="medium" />
<Alert type="info" message="Small alert" size="small" />

With Icon

Icons are shown automatically per type. Use showIcon to enable them.

<Alert type="warning" message="Please review before submitting" showIcon />

Custom Icon

import { Lock } from '@fvc/icons';

<Alert type="info" message="Authentication required" icon={<Lock />} showIcon />

Closable

<Alert type="info" message="New version available" closable />

Full Width

<Alert type="error" message="Service unavailable" block />

Props

| Prop | Type | Description | | --- | --- | --- | | type | 'info' \| 'success' \| 'warning' \| 'error' | Alert variant. Controls icon and background colour. | | message | ReactNode | Main alert message. | | size | 'medium' \| 'small' | Alert size. Defaults to 'medium'. | | block | boolean | Stretches the alert to full container width. | | icon | ReactNode | Custom icon, overrides the type-based default. | | iconColor | CSSProperties['color'] | Colour applied to the icon. | | showIcon | boolean | Show the icon. | | closable | boolean | Show a close button. | | testId | string | Maps to data-testid. | | All AlertProps | — | All Ant Design Alert props except description and banner which are not supported. |

Consumer Example

import { Alert } from '@fvc/alert';

export function FormFeedback({ status, message }) {
  if (!message) return null;

  return (
    <Alert
      type={status}
      message={message}
      size="small"
      block
      showIcon
      closable
      testId="form-feedback"
    />
  );
}

Testing

<Alert type="error" message="Not found" testId="error-alert" />
screen.getByTestId('error-alert');

Customisation

@fvc/alert exposes its visual tokens as CSS custom properties declared in src/styles/variables.scss. Override any of these in your own stylesheet — no fork, no file in the component, no re-bundle required.

/* consumer's own app stylesheet */
:root {
  --alert-info-bg-color: #e8f4fd;
  --alert-success-bg-color: #2e7d32;
  --alert-warning-bg-color: #f57c00;
  --alert-error-bg-color: #b71c1c;
  --alert-border-radius: 4px;
}

Available variables

| Variable | Default | Controls | | --- | --- | --- | | --alert-default-width | 336px | Width of the alert container | | --alert-default-padding | 16px | Padding of the alert container | | --alert-default-gap | 16px | Gap between the icon and the message in the default size | | --alert-border-radius | 8px | Corner radius of the alert container | | --alert-small-padding | 8px 16px 8px 8px | Padding of the alert container in the small size | | --alert-small-gap | 8px | Gap between the icon and the message in the small size | | --alert-small-icon-size | 20px | Width and height of the icon in the small size | | --alert-message-ff | Roboto, Arial, sans-serif | Font family of the alert message text | | --alert-message-fw | 400 | Font weight of the alert message text | | --alert-message-fz | 16px | Font size of the alert message text in the default size | | --alert-message-lh | 20px | Line height of the alert message text in the default size | | --alert-small-message-fz | 14px | Font size of the alert message text in the small size | | --alert-small-message-lh | 16px | Line height of the alert message text in the small size | | --alert-info-bg-color | var(--gray-50) | Background color of the info variant | | --alert-info-message-color | var(--body-text-color-1000) | Message text color of the info variant | | --alert-success-bg-color | var(--green-700) | Background color of the success variant | | --alert-success-message-color | var(--white-text-color-0) | Message text color of the success variant | | --alert-warning-bg-color | var(--orange-200) | Background color of the warning variant | | --alert-warning-message-color | var(--body-text-color-1000) | Message text color of the warning variant | | --alert-error-bg-color | var(--red-800) | Background color of the error variant | | --alert-error-message-color | var(--white-text-color-0) | Message text color of the error variant | | --alert-close-icon-size | 16px | Width and height of the close button container | | --alert-close-bg-color | var(--blue-gray-900) | Background color of the close button | | --alert-close-inner-size | 7px | Width and height of the close button inner icon | | --alert-close-icon-color | var(--white-text-color-0) | Color of the close button SVG icon |

Development

bun run lint
bun run type-check
bun run test
bun run build