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

@lumea-labs/locale

v0.1.1

Published

Locale & language selector UI — 3 selector variants (tabs / switch / dropdown), inline SVG round flags, zero external assets.

Readme

@lumea/locale

Tier 1 pure-UI locale and language selector for React. Three selector variants (tabs, switch, dropdown) with inline SVG round flags for the top 30 languages -- all adapter-driven with zero i18n framework, router, or external asset dependencies.

Quick start

import {
 LocaleProvider,
 LocaleBrowser,
 type LocaleAdapter,
} from "@lumea/locale";

const adapter: LocaleAdapter = {
 getLocale: async () => ({
 current: "en",
 options: [
 { code: "en", label: "English" },
 { code: "it", label: "Italiano", englishLabel: "Italian" },
 { code: "de", label: "Deutsch", englishLabel: "German" },
 ],
 }),
 setLocale: async (code) => {
 // Persist the locale change (cookie, API call, URL rewrite, etc.)
 console.log("Locale changed to:", code);
 },
};

export default function SettingsPage() {
 return (
 <LocaleProvider adapter={adapter} initialLocale="en">
 <LocaleBrowser variant="tabs" />
 </LocaleProvider>
 );
}

Capabilities

Every adapter method is optional. The UI auto-hides controls when a capability is missing -- no broken buttons, no consumer-side guards.

| Capability | Adapter method | UI gated | |--------------|----------------|-------------------------------------| | canBrowse | getLocale | Auto-load locale options on mount | | canChange | setLocale | Interactive selectors (tabs/switch/dropdown) |

When canChange is false, all selectors render in read-only mode (current locale displayed, no interactive controls). When canBrowse is false, the provider relies on initialLocale and initialOptions props passed directly.

Selector variants

| Component | Best for | |------------------------|---------------------------------| | LocaleSelectTabs | Settings pages with 2-6 options | | LocaleSelectSwitch | Binary locale toggles (EN/IT) | | LocaleSelectDropdown | Nav bars, dense UIs, many locales |

Labels

All user-facing strings are overridable via the labels prop on <LocaleProvider>. Spread defaultLocaleLabels and override what you need:

import { defaultLocaleLabels } from "@lumea/locale";

<LocaleProvider
 adapter={adapter}
 labels={{ ...defaultLocaleLabels, title: "Lingua" }}
>

Flags

Inline SVG round flags for 30 locales. No external assets, no CDN, no CORS. Each flag is a simplified geometric SVG (2-4 shapes max).

SSR-safe

Pass initialLocale and initialOptions to avoid flash on server-rendered pages. The adapter's getLocale call on mount confirms or updates the state.