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

@radianui/flags

v0.0.3

Published

Accessible, type-safe SVG country flag components for React and Next.js using ISO 3166-1 country codes.

Readme

@radianui/flags

Accessible, type-safe SVG country flag components for React and Next.js using ISO 3166-1 country codes.

Flags gallery and documentation · RadianUI · GitHub repository

Installation

pnpm add @radianui/flags

Usage

import { Flag } from "@radianui/flags"

export function Example() {
	return (
		<>
			<Flag country="NP" />
			<Flag country="GB" shape="circle" />
			<Flag country="GB" size={32} aria-label="United Kingdom" />
		</>
	)
}

country is mandatory and accepts supported uppercase ISO 3166-1 alpha-2 codes. The available shapes are flat and circle. The default shape is flat, and the default size is 24.

Flags are decorative by default and receive aria-hidden="true". Provide an aria-label when the flag communicates information that is not already available as text:

<Flag country="NP" aria-label="Nepal" />

The package also exports countryCodes, CountryCode, FlagProps, FlagShape, and getCountryName.

Metadata

The complete flag catalog is available from the metadata subpath. Each entry contains its stable ID, display name, associated country or regional codes, and CDN filename.

import { type FlagMetadata, flagMetadata } from "@radianui/flags/metadata"

const nepal = flagMetadata.find((flag) => flag.codes.includes("NP"))

Source of truth

Every flag has exactly one canonical SVG in source/flags. Filenames use lowercase kebab-case slugs, such as nepal.svg and united-kingdom.svg.

The React package and the future RadianUI CLI flag registry are both generated from these files. Generated package or registry output must never be edited as flag artwork.

source/manifest.json owns the flag IDs, display names, files, and country-code metadata. The React package exposes only supported ISO 3166-1 alpha-2 codes; regional and organizational metadata remains available for the future CLI. Run the synchronization script after adding a manifest entry, and add an explicit override for regional or organizational flags.

pnpm --filter @radianui/flags sync:manifest

Development

From the repository root:

pnpm --filter @radianui/flags validate:source
pnpm --filter @radianui/flags check-types
pnpm --filter @radianui/flags test
pnpm --filter @radianui/flags build

The validator checks metadata uniqueness, country codes, filename coverage, SVG view boxes, and unsafe SVG content.

License

MIT © RadianOS