Skip to content
nexubDesign System
v11.9.0

Components · Labels & Badges

Country Badge

StableAdded v0.0.1

A pill with a country flag and its name or code.

import { CountryBadge } from '@nexub/react';
View as Markdown

Playground

Props

size
🇸🇬Singapore
TSX
<CountryBadge code="SG" label="Singapore" />

Examples

Default

🇸🇬Singapore🇩🇪Germany🇧🇷Brazil

Sizes

🇯🇵JP🇯🇵JP🇯🇵JP

States

  • 🇸🇬Singapore
    default
  • 🇸🇬Singapore
    size="sm"
  • 🇸🇬Singapore
    size="md"
  • 🇸🇬Singapore
    size="lg"

Props

Props
PropTypeDefaultDescription
coderequiredstring—ISO 3166-1 alpha-2 country code, e.g. SG.
labelstring—Text after the flag. Defaults to code.
size'sm' | 'md' | 'lg''md'Size of the pill and flag.

On iOS & Android