Suriname Flag
SurinameFlag is a typed React wrapper around the shared Flag component that renders the national flag of Suriname with the country code fixed to "sr". It is intended for country pickers, profiles, and locale-aware UI.


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add @flagcn/sr
Requires @flagcn in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
usage.tsx
import { SurinameFlag } from "@/components/flags/countries/sr"export function Example() { return <SurinameFlag />}- Showing Suriname's flag next to its name in a country select, address form, or contact list.
- Displaying a Suriname flag in a profile, team roster, or event attendee badge.
- Rendering a locale or region indicator that needs a consistently typed, country-specific flag component.
- Building a flag grid where each country uses a dedicated typed component instead of passing raw codes.
Examples
Default flag
Renders the Suriname flag with the default alt text.
default-flag.tsx
import { SurinameFlag } from "@/components/flags/countries/sr"export function DefaultSurinameFlag() { return <SurinameFlag />}Country select option
Places the flag beside a localized country name inside a select-style list item.
country-select-option.tsx
import { SurinameFlag } from "@/components/flags/countries/sr"export function CountryOption() { return ( <li className="flex items-center gap-2"> <SurinameFlag alt="" /> <span>Suriname</span> </li> )}Custom alt text
Overrides the default alt text when the flag is the only identifier for the country.
custom-alt-text.tsx
import { SurinameFlag } from "@/components/flags/countries/sr"export function ProfileFlag() { return <SurinameFlag alt="Flag of Suriname" />}API reference
PropTypeDefaultDescription
altstring"Suriname flag"Accessible text for the flag image. Defaults to "Suriname flag". Pass an empty string when the country name is already shown nearby, so screen readers do not repeat it.
...propsOmit<FlagProps, "code">—All remaining props from FlagProps (defined in the @flagcn/flag base component) are forwarded to Flag. The code prop is omitted because it is always set to "sr".
Accessibility
- The default alt text "Suriname flag" is provided so the image is announced without extra work.
- When the country name is visible in the same context, pass alt="" to mark the flag as decorative and avoid duplicate announcements.
- Because code is fixed to "sr", the component cannot be misused to show a different country's flag.
- Ensure surrounding text, not the flag alone, conveys the country name for users who rely on text.
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 "Suriname Flag" component (flagcn/sr) from its shadcn registry.1. Install it with: npx shadcn@latest add @flagcn/sr2. 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 { SurinameFlag } from "@/components/flags/countries/sr"export function Example() { return <SurinameFlag />}```Files & dependencies
- src/components/flags/countries/sr.tsx→ @components/flags/countries/sr.tsx
registryDependencies@flagcn/flag