# Locale footer

Switch language and region in a structured site footer.

Access: pro. Category: Blocks. Kind: section.

## When to use

- Use it when a page needs switch language and region in a structured site footer.
- Choose it as the footer region when composing a page from independently reusable TidalUI sections.

## Alternatives

- Choose footer instead when a responsive semantic footer with typed navigation groups, native destination links, and optional reference, status, and legal regions is the actual interface need, rather than locale footer.

## Setup for agents

Use React 19 and TypeScript. Initialize shadcn for your framework, then merge this exact entry into components.json:

```json
{
  "registries": {
    "@tidal-pro": {
      "url": "https://tidalui.com/r/pro/{name}.json",
      "headers": {
        "Authorization": "Bearer ${TIDALUI_TOKEN}"
      }
    }
  }
}
```

The namespace must be named **@tidal-pro** because transitive Pro dependencies use that namespace. Obtain an agent key from your active Pro account at https://tidalui.com/account. Keep TIDALUI_TOKEN in your local environment, never in components.json, client code, Git or logs.

```sh
export TIDALUI_TOKEN='your-private-agent-key'
npx shadcn@latest add @tidal-pro/waitlist-form
npx shadcn@latest add https://tidalui.com/r/tidal-button.json
```

Free command: `npx shadcn@latest add https://tidalui.com/r/<name>.json`.
Pro command: `npx shadcn@latest add @tidal-pro/<name>`.

Import the base stylesheet and every stylesheet listed on the installed item's metadata. For example:

```tsx
import "./components/ui/tidal.css";
import "./components/ui/hero-section.css";
// Place installed components inside this wrapper:
<div className="tidal-scope" data-theme="dark">...</div>
```

Omit data-theme for the default light theme. Put the attribute on the same tidal-scope element for dark mode. Every component installs the shared free tidal-base dependency. After upgrading, run `npx shadcn@latest add https://tidalui.com/r/tidal-base.json --overwrite` to receive current tokens. Review local modifications before overwriting.

Vite: Use React + TypeScript. Map @/* to ./src/* in paths and Vite resolve.alias. Import tidal.css and each component stylesheet in your application entry.

Next.js 15 App Router: Next.js App Router: import tidal.css and component CSS in app/layout.tsx. Interactive examples belong in a client component with "use client". Map @/* to ./* or ./src/* to match your project.

TypeScript 6: use paths without baseUrl:

```json
{
  "compilerOptions": {
    "paths": {
      "@/*": [
        "./src/*"
      ]
    }
  }
}
```

Pro registry requests are server/CLI-only. Use the same-origin account interface in a browser; cross-origin Authorization preflights are intentionally unsupported.


## Install Locale footer

```sh
npx shadcn@latest add @tidal-pro/footer-locale
```

Stylesheets: `components/ui/tidal.css`, `components/ui/footer-locale.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/footer-locale.css";
import{TidalFooterLocale}from"./components/ui/footer-locale";
export default(p:Parameters<typeof TidalFooterLocale>[0])=><div className="tidal-scope"><TidalFooterLocale {...p}/></div>;
```

## Structured props

- `TidalFooterLocale.brand: ReactNode`: Required brand value accepted by this exported component.
- `TidalFooterLocale.groups: ReadonlyArray<TidalFooterLocaleGroup>`: Required groups value accepted by this exported component.
- `TidalFooterLocale.locale: TidalFooterLocalePicker`: Required locale value accepted by this exported component.
- `TidalFooterLocale.title: ReactNode`: Required title value accepted by this exported component.
- `TidalFooterLocale.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalFooterLocale.headingLevel?: TidalFooterLocaleHeadingLevel | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalFooterLocale.legal?: ReactNode`: Optional legal value accepted by this exported component.
- `TidalFooterLocale.navigationLabel?: string | undefined` (default "Localized footer navigation"): Optional navigation label value accepted by this exported component.
- `TidalFooterLocale.region?: TidalFooterLocalePicker | undefined`: Optional region value accepted by this exported component.
- `TidalFooterLocale.status?: ReactNode`: Optional status value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/footer-locale.tsx) | [Manifest](https://tidalui.com/examples/footer-locale.json). Install the listed additional dependencies. Consumer fixture: TypeScript pass; Vite pass. This fixture check is distinct from the actual shadcn install receipt.

```tsx
import "./components/ui/tidal.css";

import { useMemo, useState, type MouseEvent } from "react";

import { TidalFooterLocale, type TidalFooterLocaleGroup, type TidalFooterLocaleLinkItem } from "./components/ui/footer-locale";

import "./components/ui/footer-locale.css";



const tidalExampleStyles = ".tidal-scope .footer-pilot-demo,\n.tidal-scope .footer-pilot-demo * {\n  box-sizing: border-box;\n}\n\n.tidal-scope .footer-pilot-demo {\n  inline-size: min(100%, 1240px);\n  min-inline-size: 0;\n  margin-inline: auto;\n}";

type LocaleKey = "en" | "es" | "de";

const copy: Record<
  LocaleKey,
  {
    brand: string;
    title: string;
    description: string;
    groups: readonly { title: string; links: readonly string[] }[];
    legal: string;
  }
> = {
  en: {
    brand: "TidalUI",
    title: "Build with TidalUI.",
    description: "React components, blocks and templates.",
    groups: [
      { title: "Product", links: ["Components", "Templates"] },
      { title: "Company", links: ["About", "Journal"] },
      { title: "Help", links: ["Documentation", "Contact"] },
    ],
    legal: "© 2026 TidalUI. Sample localized copy only.",
  },
  es: {
    brand: "TidalUI",
    title: "Crea con TidalUI.",
    description: "Componentes, bloques y plantillas de React.",
    groups: [
      { title: "Producto", links: ["Componentes", "Plantillas"] },
      { title: "Empresa", links: ["Acerca de", "Diario"] },
      { title: "Ayuda", links: ["Documentación", "Contacto"] },
    ],
    legal: "© 2026 TidalUI. Solo texto localizado de muestra.",
  },
  de: {
    brand: "TidalUI",
    title: "Entwickle mit TidalUI.",
    description: "React-Komponenten, Blöcke und Vorlagen.",
    groups: [
      { title: "Produkt", links: ["Komponenten", "Vorlagen"] },
      { title: "Unternehmen", links: ["Über uns", "Journal"] },
      { title: "Hilfe", links: ["Dokumentation", "Kontakt"] },
    ],
    legal: "© 2026 TidalUI. Nur lokalisierter Beispieltext.",
  },
};

function isPlainPrimary(event: MouseEvent<HTMLAnchorElement>) {
  return (
    event.button === 0 &&
    !event.metaKey &&
    !event.ctrlKey &&
    !event.shiftKey &&
    !event.altKey
  );
}

export function FooterLocaleDemo() {
  const [locale, setLocale] = useState<LocaleKey>("en");
  const [region, setRegion] = useState("us");
  const [notice, setNotice] = useState(
    "English copy loaded. Choose a language or region.",
  );
  const localized = copy[locale];

  const groups = useMemo<readonly TidalFooterLocaleGroup[]>(
    () =>
      localized.groups.map((group, groupIndex) => ({
        id: `${locale}-group-${groupIndex}`,
        title: group.title,
        links: group.links.map(
          (label, linkIndex): TidalFooterLocaleLinkItem => ({
            id: `${locale}-link-${groupIndex}-${linkIndex}`,
            href: "#footer-locale-demo",
            label,
            onClick: (event: import("react").MouseEvent<HTMLAnchorElement>) => {
              if (!isPlainPrimary(event)) return;
              event.preventDefault();
              setNotice(
                `${label} selected in ${locale.toUpperCase()} for ${region.toUpperCase()}. No navigation occurred.`,
              );
            },
          }),
        ),
      })),
    [locale, localized.groups, region],
  );

  return (
    <div className="footer-pilot-demo" id="footer-locale-demo">
      <TidalFooterLocale
        brand={localized.brand}
        title={localized.title}
        description={localized.description}
        groups={groups}
        locale={{
          value: locale,
          options: [
            { value: "en", label: "English" },
            { value: "es", label: "Español" },
            { value: "de", label: "Deutsch" },
          ],
          label: "Language",
          onChange: (value) => {
            const next = value as LocaleKey;
            setLocale(next);
            setNotice(
              `${copy[next].brand} copy loaded for ${next.toUpperCase()}.`,
            );
          },
        }}
        region={{
          value: region,
          options: [
            { value: "us", label: "United States" },
            { value: "eu", label: "Europe" },
            { value: "jp", label: "Japan" },
          ],
          label: "Region",
          onChange: (value) => {
            setRegion(value);
            setNotice(
              `Region changed to ${value.toUpperCase()}. Consumer callback received the selection.`,
            );
          },
        }}
        legal={localized.legal}
        status={
          <span role="status" aria-live="polite">
            {notice}
          </span>
        }
      />
    </div>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <FooterLocaleDemo />
    </div>
  );
}

```

## Gotchas

- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.

## Theme and accessibility

{"tokens":["--t-accent","--t-border","--t-border-strong","--t-canvas","--t-danger","--t-display","--t-ease-out","--t-ease-spring","--t-faint","--t-font","--t-ink","--t-line","--t-muted","--t-primary","--t-primary-contrast","--t-radius-card","--t-radius-control","--t-radius-overlay","--t-radius-panel","--t-ring","--t-shadow-lg","--t-shadow-soft","--t-soft","--t-subtle","--t-surface","--t-wash"],"darkMode":true}

{"keyboard":["Tab and Shift+Tab follow the component's native focus order.","Arrow-key behavior follows the exported composite-control implementation."],"aria":"The component wires labels and relationships from consumer-provided visible text or ARIA props; preserve those labels in production.","notes":"Verify focus visibility, text alternatives, contrast, and reduced motion in the final composition."}

Required brand, title, localized groups and a controlled locale picker. An optional controlled region picker uses the same accessible native select contract. Consumers supply every localized string, navigation destination, option label, selection callback and side effect. Native footer, select and anchor attributes plus direct refs are forwarded; children and dangerouslySetInnerHTML replacement are removed. aria-disabled links omit href and suppress activation. Heading levels are bounded to h2-h4 and group headings remain subordinate.
