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

@fluixi-ui/image

v0.1.0-alpha.9

Published

Image with loading / error states for the Fluixi UI ecosystem

Readme

@fluixi-ui/image

An image with loading and error states for Fluixi UI.

Layers the <img>, an optional placeholder (while loading), and a fallback (on error) inside a sized box; give it a width/height or aspect ratio and it fades the image in on load, swapping to the fallback if the source fails.

import { Image } from '@fluixi-ui/image';
import { Skeleton } from '@fluixi-ui/skeleton';

<Image
  src={product.thumbnail}
  alt={product.title}
  style="width:64px;height:64px;border-radius:8px"
  placeholder={<Skeleton style="width:100%;height:100%" />}
  fallback={<span>📷</span>}
/>

Optimization & lazy loading

The component never optimizes the bytes itself — it stays framework-agnostic and asks a pluggable loader for the right URLs, then leans on native browser features. (A built-in optimization endpoint, if you want one, belongs in the framework/meta-framework and would just be plugged in via loader.)

<Image
  src="/products/mug.jpg"
  alt="Mug"
  aspectRatio={1}
  sizes="(max-width: 600px) 100vw, 240px"
  widths={[120, 240, 480]}
  loader={({ src, width, quality }) => `https://cdn.example.com${src}?w=${width}&q=${quality ?? 75}`}
  blurDataURL={mug.lqip}
/>

// Above-the-fold hero: eager + high fetch priority
<Image src={hero} alt="" priority style="width:100%" />

Props

Extends the native <img> attributes, plus:

| Prop | Type | Description | | --- | --- | --- | | lazy | boolean | loading="lazy" + decoding="async" (default true). | | priority | boolean | Load eagerly with fetchpriority="high". | | loader | (args: { src; width; quality? }) => string | Map to an optimized URL; with widths, builds a srcset. | | widths | number[] | Candidate widths for the generated srcset. | | sizes | string | Responsive sizes attribute. | | srcset | string | Explicit srcset when not using a loader. | | quality | number | Forwarded to the loader. | | aspectRatio | number \| string | Reserve space to avoid layout shift. | | blurDataURL | string | Tiny blurred data URL shown until load (LQIP). | | placeholder | JSX.Element | Shown while loading (ignored if blurDataURL set). | | fallback | JSX.Element | Shown instead of the image on error. | | onStatusChange | (status) => void | Load lifecycle. |

Reflects data-status on [data-image]. Styled by @fluixi-ui/tokens ([data-image], [data-image-img], [data-image-blur]).