# Workspace footer

Account identity, workspace selection and session actions for an app shell.

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

## When to use

- Use it when a page needs account identity, workspace selection and session actions for an app shell.
- 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 workspace 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 Workspace footer

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

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

## Minimal example

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

## Structured props

- `TidalFooterWorkspace.activeWorkspaceId: string | null`: Required active workspace id value accepted by this exported component.
- `TidalFooterWorkspace.brand: ReactNode`: Required brand value accepted by this exported component.
- `TidalFooterWorkspace.heading: ReactNode`: Required heading value accepted by this exported component.
- `TidalFooterWorkspace.identity: TidalFooterWorkspaceIdentity`: Required identity value accepted by this exported component.
- `TidalFooterWorkspace.onWorkspaceChange: (id: string, event: React.ChangeEvent<HTMLSelectElement>) => void`: Callback invoked when the workspace change interaction is proposed.
- `TidalFooterWorkspace.workspaces: ReadonlyArray<TidalFooterWorkspaceOption>`: Required workspaces value accepted by this exported component.
- `TidalFooterWorkspace.accountLinks?: ReadonlyArray<TidalFooterWorkspaceLink> | undefined` (default []): Optional account links value accepted by this exported component.
- `TidalFooterWorkspace.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalFooterWorkspace.headingLevel?: TidalFooterWorkspaceHeadingLevel | undefined` (default "h2"): Optional heading level value accepted by this exported component.
- `TidalFooterWorkspace.legal?: ReactNode`: Optional legal value accepted by this exported component.
- `TidalFooterWorkspace.linkLabel?: ReactNode` (default "Account and help"): Optional link label value accepted by this exported component.
- `TidalFooterWorkspace.onSignOut?: ((event: MouseEvent<HTMLButtonElement>) => void) | undefined`: Callback invoked when the sign out interaction is proposed.
- `TidalFooterWorkspace.signOutButtonProps?: SafeButtonProps | undefined`: Optional sign out button props value accepted by this exported component.
- `TidalFooterWorkspace.signOutButtonRef?: Ref<HTMLButtonElement> | undefined`: Optional sign out button ref value accepted by this exported component.
- `TidalFooterWorkspace.signOutError?: ReactNode`: Optional sign out error value accepted by this exported component.
- `TidalFooterWorkspace.signOutLabel?: ReactNode` (default "Sign out"): Optional sign out label value accepted by this exported component.
- `TidalFooterWorkspace.signOutState?: TidalFooterWorkspaceSignOutState | undefined` (default "idle"): Optional sign out state value accepted by this exported component.
- `TidalFooterWorkspace.signOutStatus?: ReactNode`: Optional sign out status value accepted by this exported component.
- `TidalFooterWorkspace.status?: ReactNode`: Optional status value accepted by this exported component.
- `TidalFooterWorkspace.workspaceDescription?: ReactNode`: Optional workspace description value accepted by this exported component.
- `TidalFooterWorkspace.workspaceLabel?: ReactNode` (default "Workspace"): Optional workspace label value accepted by this exported component.
- `TidalFooterWorkspace.workspaceSelectProps?: SafeSelectProps | undefined`: Optional workspace select props value accepted by this exported component.
- `TidalFooterWorkspace.workspaceSelectRef?: Ref<HTMLSelectElement> | undefined`: Optional workspace select ref value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/footer-workspace.tsx) | [Manifest](https://tidalui.com/examples/footer-workspace.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 { useState, type MouseEvent } from "react";

import { TidalFooterWorkspace, type TidalFooterWorkspaceLink, type TidalFooterWorkspaceOption, type TidalFooterWorkspaceSignOutState } from "./components/ui/footer-workspace";

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

import "./components/ui/native-select.css";

import "./components/ui/status-badge.css";



const tidalExampleStyles = ".tidal-scope .footer-pilot-07-demo {\n  inline-size: 100%;\n  min-inline-size: 0;\n}";

const workspaces: readonly TidalFooterWorkspaceOption[] = [
  {
    id: "northstar",
    label: "Northstar studio",
    role: "Administrator",
    status: "success",
    statusLabel: "Operational",
  },
  {
    id: "field-notes",
    label: "Field notes workspace",
    role: "Editor",
    status: "neutral",
    statusLabel: "Limited access",
  },
];

const links: readonly TidalFooterWorkspaceLink[] = [
  { id: "account", label: "Account settings", href: "#workspace-account" },
  { id: "help", label: "Help center", href: "#workspace-help" },
  { id: "privacy", label: "Privacy", href: "#workspace-privacy" },
];

function handlePreviewClick(
  label: string,
  setStatus: (status: string) => void,
) {
  return (event: MouseEvent<HTMLAnchorElement>) => {
    if (
      event.defaultPrevented ||
      event.button !== 0 ||
      (event.detail !== 0 && event.detail !== 1) ||
      event.metaKey ||
      event.ctrlKey ||
      event.shiftKey ||
      event.altKey ||
      event.currentTarget.target
    ) {
      return;
    }
    event.preventDefault();
    setStatus(`${label} selected in this local preview.`);
  };
}

export function FooterWorkspaceDemo() {
  const [activeWorkspaceId, setActiveWorkspaceId] = useState("northstar");
  const [signOutState, setSignOutState] =
    useState<TidalFooterWorkspaceSignOutState>("idle");
  const [status, setStatus] = useState("No workspace callback has run.");
  const previewLinks = links.map((link) => ({
    ...link,
    onClick: handlePreviewClick(String(link.label), setStatus),
  }));
  return (
    <div className="footer-pilot-07-demo">
      <TidalFooterWorkspace
        aria-label="Workspace account footer example"
        brand={<span>TidalUI workspace</span>}
        heading="Your workspace."
        description="Manage your workspace and account."
        identity={{
          name: "Alex Morgan",
          email: "alex@example.test",
          role: "Workspace administrator",
        }}
        workspaces={workspaces}
        activeWorkspaceId={activeWorkspaceId}
        onWorkspaceChange={(id) => {
          setActiveWorkspaceId(id);
          setStatus(`Workspace change proposed for ${id}.`);
        }}
        workspaceDescription="This sample changes the selected workspace locally."
        accountLinks={previewLinks}
        onSignOut={() => {
          setSignOutState("confirmed");
          setStatus(
            "Local preview only. The consumer sign-out callback ran; no session changed.",
          );
        }}
        signOutLabel="Test sign out"
        signOutState={signOutState}
        signOutStatus={
          signOutState === "confirmed"
            ? "Consumer callback completed locally; no auth request was sent."
            : undefined
        }
        status={status}
        legal={<span>Fictional account. No real session is changed.</span>}
      />
    </div>
  );
}

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

```

## Gotchas

- The host application owns data, validation, persistence, navigation, and service side effects described by this API.

## 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, heading, identity, workspace options, activeWorkspaceId and onWorkspaceChange callback. Workspace options require unique nonblank IDs and consumer-owned role, status and labels; disabled options cannot be proposed. The native select forwards safe caller attributes, native input, keyboard and pointer callbacks and a direct ref. Account links require unique IDs and suppress href plus click and auxiliary activation when disabled. Sign-out state, callbacks, session handling, routing, authorization, tenant data and persistence remain consumer-owned; the component performs no auth or network work. The responsive neutral layout keeps 44px links, select and sign-out targets, 16px editing text, long organization wrapping, RTL-safe layout and reduced motion.
