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

@sankyu/react-circle-flags

v1.5.0

Published

πŸ“¦ 400+ circular SVG React flags β€” tree-shakeable, TypeScript-ready, SSR-compatible, zero deps.

Readme

@sankyu/react-circle-flags

npm version Bundle Size npm downloads Last Commit

CI Release codecov

TypeScript supported React Ready MIT License


:star: Star us on GitHub | :bug: Report Issues here

:rocket: Explore the Demo Gallery | :book: Read the Documentation


πŸ“– Overview

This library provides 400+ circular SVG flag components with Full-TypeScript support & Tree-shaking Optimization.

Perfect for applications that need fast, crisp country flags without external image requests.


✨ Key Features

[!TIP] For more information, you may refer to the Documentation.

  • 🎯 Tree-shakable - Only bundle the flags you use
  • πŸ“¦ TypeScript - Full type definitions included
  • ⚑ Zero dependencies - Only requires React as peer dependency
  • 🎨 Inline SVG - No external requests, works offline
  • πŸ”§ Fully customizable - All standard SVG props supported
  • πŸ“± SSR compatible - Works with Next.js, Remix, etc.
  • πŸͺΆ Lightweight - Each flag is ~1KB

πŸ“¦ Installation

npm install @sankyu/react-circle-flags
# or
pnpm add @sankyu/react-circle-flags
# or
yarn add @sankyu/react-circle-flags
# or
bun add @sankyu/react-circle-flags

[!TIP] For more information, you may refer to the Installation Guide.

πŸš€ Usage

Import individual flags (Recommended)

import { FlagUs, FlagCn, FlagGb } from '@sankyu/react-circle-flags'

export default function App() {
  return (
    <div>
      <FlagUs width={48} height={48} />
      <FlagCn width={48} height={48} />
      <FlagGb width={48} height={48} />
    </div>
  )
}

Other usage examples

[!TIP] For more information, you may refer to the Usage Guide.

πŸ“š API

Build Meta Information

You can access the library's build meta information from the buildMeta export:

import { buildMeta } from '@sankyu/react-circle-flags'

console.log(buildMeta.version) // e.g., "1.2.3"
console.log(buildMeta.builtTimestamp) // e.g., 1760000000000
console.log(buildMeta.commitHash) // e.g., <example-sha256-hash>
console.log(buildMeta.circleFlagsCommitHash) // e.g., <example-sha256-hash>

Other Props

...For more information, you may refer to the API Reference.

Available Flags

Each flag is exported with the pattern Flag{PascalCase ISO_CODE} (for example, FlagUs, FlagCn). Convenience aliases are provided for common two-letter codes: FlagUs, FlagCn, FlagGb, FlagJp.

  • FlagUs - United States
  • FlagCn - China
  • FlagGb - United Kingdom
  • FlagJp - Japan
  • ... and many more

See the Full list of flags in the react-circle-flags gallery.

🎨 Styling

Flag components accept all standard SVG props, making them easy to style with any CSS approach.

[!TIP] For more information, you may refer to the Styling Guide.

πŸ”§ TypeScript

All flag components are fully typed with TypeScript, providing autocomplete and type safety out of the box.

[!TIP] For more information, you may refer to the TypeScript Guide.

πŸ“– Examples

[!TIP] For more information, you may refer to the Guide - Basic Usage.

πŸ“¦ Bundle Size & Tree-shaking

@sankyu/react-circle-flags is designed to be tree-shakable.

Importing individual flags ensures that only the used flags are included in your bundle.

[!TIP] For more information, you may refer to the Bundle Size & Tree-shaking Guide.

🀝 Contributing

Please see CONTRIBUTING.md for contribution guidelines.

πŸ“„ License

@sankyu/react-circle-flags is licensed under the MIT License, Β© Sankyu Lab

website is licensed under the GPL-3.0 License, Β© Sankyu Lab

πŸ™ Credits