Turkmenistan Flag

TurkmenistanFlag is a typed React component that renders the flag of Turkmenistan through the shared Flag primitive from @flagcn/flag, with the country code fixed to "tm". It supports no-crop 4:3 and 1:1 frames and SVG, PNG, WebP, and JPEG output.

componentflagscountriesinternationalizationregistry-item.json
Turkmenistan 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/tm

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

Usage

usage.tsx
import { TurkmenistanFlag } from "@/components/flags/countries/tm"export function Example() {  return <TurkmenistanFlag />}
  • Showing a Turkmenistan flag next to country selectors, language or locale pickers, or country lists.
  • Displaying a flag beside Turkmenistan-related content such as profiles, shipping or address forms, or event listings.
  • Rendering a flag in a fixed 4:3 or 1:1 frame without cropping, using the shared Flag component's options.
  • Reusing a typed country-flag component instead of hand-writing an image tag for each flag.

Examples

Basic flag

Renders the Turkmenistan flag with the default accessible label.

basic-flag.tsx
import { TurkmenistanFlag } from "@/components/flags/countries/tm"export function BasicFlag() {  return <TurkmenistanFlag />}

Country picker option

Uses a custom alt text inside a labeled country option.

country-picker-option.tsx
import { TurkmenistanFlag } from "@/components/flags/countries/tm"export function CountryOption() {  return (    <div className="flex items-center gap-2">      <TurkmenistanFlag alt="Flag of Turkmenistan" />      <span>Turkmenistan</span>    </div>  )}

Decorative flag beside a heading

Marks the flag as decorative by passing an empty alt, since the adjacent text already names the country.

decorative-flag-beside-a-heading.tsx
import { TurkmenistanFlag } from "@/components/flags/countries/tm"export function ShippingHeading() {  return (    <h2 className="flex items-center gap-2">      <TurkmenistanFlag alt="" />      Shipping to Turkmenistan    </h2>  )}

API reference

PropTypeDefaultDescription
altstring"Turkmenistan flag"Accessible text passed to the underlying Flag image. Defaults to "Turkmenistan flag". Pass an empty string when the flag is decorative and the surrounding text already names the country.
...propsOmit<FlagProps, "code">—All remaining props are forwarded to Flag. The code prop is omitted because it is fixed to "tm". The exact set of accepted props is defined by FlagProps in @flagcn/flag and is not restated here.

Accessibility

  • The default alt is "Turkmenistan flag", so the image is announced by name when no alt is given.
  • If the flag appears next to visible text naming Turkmenistan, pass alt="" so screen readers do not repeat the country name.
  • Do not rely on the flag alone to convey meaning; pair it with a text label in selectors and lists.
  • Keep the surrounding layout accessible by ensuring the flag does not shift focus order or hide interactive labels.

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 "Turkmenistan Flag" component (flagcn/tm) from its shadcn registry.1. Install it with: npx shadcn@latest add @flagcn/tm2. 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 { TurkmenistanFlag } from "@/components/flags/countries/tm"export function Example() {  return <TurkmenistanFlag />}```

Files & dependencies

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

Looks similar, elsewhere