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

@molecule/app-weather-card-react

v1.0.1

Published

Atmospheric current-conditions hero card: gradient background, glass condition pill, 24h temperature sparkline, optional alert badge. Extracted from weather-dashboard flagship.

Readme

@molecule/app-weather-card-react

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

@molecule/app-weather-card-react — current-conditions hero card. Gradient background, glass condition pill, optional alert badge, hi/lo chip, and a 24h temperature sparkline rendered from a trace.

Stateless about i18n and units: pre-formatted ReactNode labels (eyebrow, feelsLikeLabel, highLowLabel, updatedLabel, alertLabel) so the consumer owns translation and formatting.

Extracted from the weather-dashboard flagship.

Quick Start

import { WeatherCard, type WeatherTracePoint } from '@molecule/app-weather-card-react'

const hourly: WeatherTracePoint[] = [
  { hour: '09:00', temperature: 58 },
  { hour: '12:00', temperature: 64 },
  { hour: '15:00', temperature: 66 },
]

<WeatherCard
  locationName="San Francisco"
  region="California, USA"
  temperature={62}
  condition="Partly cloudy"
  conditionIcon="partly_cloudy_day"
  eyebrow="Right now"
  feelsLikeLabel="Feels like 60°"
  highLowLabel="H 68° · L 54°"
  updatedLabel="Updated 5m ago"
  alertLevel="watch"
  alertLabel="Heat watch"
  trace={hourly}
/>

Type

feature

Installation

npm install @molecule/app-weather-card-react @molecule/app-react @molecule/app-ui @molecule/app-ui-react react
npm install -D @types/react

API

Interfaces

WeatherCardProps

Props for the {@link WeatherCard} component.

interface WeatherCardProps {
  locationName: string
  region?: string | null
  temperature: number
  /** Currently INERT — nothing renders it; pass `feelsLikeLabel` instead. */
  feelsLike?: number | null
  /** Currently INERT — nothing renders it; pass `highLowLabel` instead. */
  high?: number | null
  /** Currently INERT — nothing renders it; pass `highLowLabel` instead. */
  low?: number | null
  condition?: string | null
  /** material-symbols icon name. */
  conditionIcon?: string
  alertLevel?: WeatherAlertLevel | null
  alertLabel?: ReactNode
  /** Pre-formatted relative time string (e.g. "5m ago"). */
  updatedLabel?: ReactNode
  unit?: string
  /** "Right now" eyebrow text — defaults to empty. */
  eyebrow?: ReactNode
  /** 24h trace driving the area sparkline. */
  trace?: ReadonlyArray<WeatherTracePoint>
  /** Pre-formatted "Feels like {N}°" label. */
  feelsLikeLabel?: ReactNode
  /** Pre-formatted high/low chip label. */
  highLowLabel?: ReactNode
  className?: string
}

WeatherTracePoint

A single hour's temperature measurement in the 24h sparkline trace.

interface WeatherTracePoint {
  hour: string
  temperature: number
}

Types

WeatherAlertLevel

Severity level for a weather alert badge.

type WeatherAlertLevel = 'watch' | 'warning' | 'emergency'

Functions

WeatherCard(props)

Atmospheric current-conditions hero.

function WeatherCard({
  locationName,
  region,
  temperature,
  condition,
  conditionIcon = 'partly_cloudy_day',
  alertLevel,
  alertLabel,
  updatedLabel,
  unit = '°F',
  eyebrow,
  trace,
  feelsLikeLabel,
  highLowLabel,
  className,
}: WeatherCardProps): ReactElement<unknown, string | JSXElementConstructor<any>>

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-react ^1.0.1
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-react ^1.0.1
  • react ^18.0.0 || ^19.0.0

Runtime Dependencies

  • @molecule/app-react
  • @molecule/app-ui
  • @molecule/app-ui-react
  • react

The numeric feelsLike, high and low props are currently INERT — nothing renders them; only the pre-formatted feelsLikeLabel / highLowLabel strings appear, so always pass the labels. With no trace (or fewer than 2 points) the sparkline falls back to a fixed DECORATIVE path — it looks like data but is fake; pass a real trace or hide the card. conditionIcon and the alert badge use Material Symbols ligature names (host app must load that font). Styling leans on raw Tailwind + Material-3 tokens (from-primary, to-tertiary-container, text-primary-fixed/80, arbitrary values like min-h-[360px]): a Tailwind build source-scanning this package's dist plus an M3 theme are prerequisites, and text is always white on the gradient. unit defaults to '°F'; temperature is rendered rounded. Props (documented on the exported WeatherCardProps interface): locationName, region, temperature, feelsLike (inert), high (inert), low (inert), condition, conditionIcon, alertLevel, alertLabel, updatedLabel, unit, eyebrow, trace, feelsLikeLabel, highLowLabel, className.