Andorra Flag

AndorraFlag is a typed React component that renders the flag of Andorra by wrapping the shared Flag primitive with code fixed to "ad". It supports no-crop 4:3 and 1:1 frames and the svg, png, webp, and jpg formats listed in the registry metadata.

componentflagscountriesinternationalizationregistry-item.json
Andorra Flag
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @flagcn/ad

Requires @flagcn in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { AndorraFlag } from "@/components/flags/countries/ad"export function Example() {  return <AndorraFlag />}
  • Show Andorra's flag next to a country selector, language switcher, or localized price or address field.
  • Display a flag in a list of countries, such as a directory, shipping destinations, or a travel or event listing.
  • Use the 1:1 ratio for avatars or compact badges, and 4:3 for cards or table cells.
  • Pass a custom alt when the flag needs context beyond the default "Andorra flag" label.

Examples

Country selector option

Render the flag inline beside the country name inside a select list item.

country-selector-option.tsx
import { AndorraFlag } from "@/components/flags/countries/ad"export function CountryOption() {  return (    <div className="flex items-center gap-2">      <AndorraFlag className="h-4 w-6" />      <span>Andorra</span>    </div>  )}

Square avatar badge

Use the 1:1 frame style via className for a compact badge next to a user profile.

square-avatar-badge.tsx
import { AndorraFlag } from "@/components/flags/countries/ad"export function FlagBadge() {  return <AndorraFlag alt="Nationality: Andorra" className="size-8 rounded-full" />}

Custom accessible label

Override the default alt text to describe the flag in the surrounding context.

custom-accessible-label.tsx
import { AndorraFlag } from "@/components/flags/countries/ad"export function ShippingDestination() {  return <AndorraFlag alt="Ship to Andorra" className="h-5 w-7" />}

API reference

PropTypeDefaultDescription
altstring"Andorra flag"Accessible text for the flag image. Defaults to "Andorra flag" and is passed to the underlying Flag component.
...propsOmit<FlagProps, "code">—All remaining props from the shared FlagProps type (defined in ../flag) are forwarded to Flag. The code prop is fixed to "ad" and cannot be overridden.

Accessibility

  • The default alt text "Andorra flag" gives screen readers the country name; override alt when the flag is decorative or has surrounding text, and pass an empty string only if the country name is already announced nearby.
  • Do not rely on the flag alone to convey a country choice; pair it with a visible country name.
  • Ensure the rendered frame has enough contrast and size when used at small sizes, such as 16px tall.
  • Because the component is a plain image-based flag, it adds no keyboard interaction or ARIA roles of its own; add role or interactive wrappers in the parent when needed.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Andorra Flag" component (flagcn/ad) from its shadcn registry.1. Install it with: npx shadcn@latest add @flagcn/ad2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: alt, ...props.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { AndorraFlag } from "@/components/flags/countries/ad"export function Example() {  return <AndorraFlag />}```

Files & dependencies

  • src/components/flags/countries/ad.tsx→ @components/flags/countries/ad.tsx
registryDependencies@flagcn/flag

Looks similar, elsewhere