South Dakota Flag

SouthDakotaFlag is a typed React wrapper that renders the South Dakota state flag through the shared Flag component, fixed to the us-sd code. It accepts all FlagProps except code, and its default alt text is "South Dakota flag".

componentflagscountriesinternationalizationregistry-item.json
South Dakota 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/us-sd

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

Usage

usage.tsx
import { SouthDakotaFlag } from "@/components/flags/countries/us-sd"export function Example() {  return <SouthDakotaFlag />}
  • Show South Dakota's flag in a country or state picker, a locale selector, or a region list.
  • Display a US state flag next to its name in a table, card, or profile.
  • Need a typed South Dakota flag component so the us-sd code is never passed by hand.
  • Want the flag cropped-free in a fixed 4:3 or 1:1 frame, using the shared Flag rendering.

Examples

Default flag

Render the flag with the default alt text.

default-flag.tsx
import { SouthDakotaFlag } from "@/components/flags/countries/us-sd"export function DefaultFlag() {  return <SouthDakotaFlag />}

Custom alt text

Override the alt text when the flag is part of a labelled context.

custom-alt-text.tsx
import { SouthDakotaFlag } from "@/components/flags/countries/us-sd"export function LabelledFlag() {  return <SouthDakotaFlag alt="Flag of South Dakota, USA" />}

State list item

Use the component inside a list of US state flags.

state-list-item.tsx
import { SouthDakotaFlag } from "@/components/flags/countries/us-sd"export function StateRow() {  return (    <li className="flex items-center gap-2">      <SouthDakotaFlag alt="" />      <span>South Dakota</span>    </li>  )}

API reference

PropTypeDefaultDescription
altstring"South Dakota flag"Accessible text for the flag image. Defaults to "South Dakota flag". Pass an empty string when the flag is decorative next to visible text.
...propsOmit<FlagProps, "code">—All other FlagProps except code are forwarded to the underlying Flag component. Their exact names and types are defined in the registry's @flagcn/flag item, not in this item's source.

Accessibility

  • The default alt text "South Dakota flag" is announced by screen readers when the image is meaningful.
  • When the flag sits next to the visible state name, pass alt="" so the name is not read twice.
  • Use a descriptive alt such as "Flag of South Dakota, USA" when the flag stands alone.
  • Keep the flag's aspect ratio intact and avoid stretching it, so the seal stays readable.

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 "South Dakota Flag" component (flagcn/us-sd) from its shadcn registry.1. Install it with: npx shadcn@latest add @flagcn/us-sd2. 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 { SouthDakotaFlag } from "@/components/flags/countries/us-sd"export function Example() {  return <SouthDakotaFlag />}```

Files & dependencies

  • src/components/flags/countries/us-sd.tsx→ @components/flags/countries/us-sd.tsx
registryDependencies@flagcn/flag

Looks similar, elsewhere