# Radio cards

Select a workspace type from descriptive cards.

Access: pro. Category: Forms. Kind: composite.

## When to use

- Use it when a page needs select a workspace type from descriptive cards.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.

## Alternatives

- Choose form-field instead when a labeled email field with validation and help text is the actual interface need, rather than radio cards.

## 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 Radio cards

```sh
npx shadcn@latest add @tidal-pro/radio-cards
```

Stylesheets: `components/ui/tidal.css`, `components/ui/radio-cards.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/radio-cards.css";
import{TidalRadioCards}from"./components/ui/radio-cards";
export default()=><div className="tidal-scope"><TidalRadioCards label={"Demo"} onValueChange={() => {}} options={[{value:"value",label:"Demo"}]} value={"value"}/></div>;
```

## Structured props

- `TidalRadioCards.label: string`: Required label value accepted by this exported component.
- `TidalRadioCards.onValueChange: (value: string) => void`: Callback invoked when the value change interaction is proposed.
- `TidalRadioCards.options: Array<TidalRadioOption>`: Required options value accepted by this exported component.
- `TidalRadioCards.value: string`: Required value value accepted by this exported component.
- `TidalRadioCards.className?: string | undefined` (default ""): Optional class name value accepted by this exported component.
- `TidalRadioCards.disabled?: boolean | undefined`: Optional disabled value accepted by this exported component.
- `TidalRadioCards.name?: string | undefined`: Optional name value accepted by this exported component.
- `TidalRadioCards.required?: boolean | undefined`: Optional required value accepted by this exported component.

## Complete usage example

[Source](https://tidalui.com/examples/radio-cards.tsx) | [Manifest](https://tidalui.com/examples/radio-cards.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 { TidalRadioCards } from "./components/ui/radio-cards";

import "./components/ui/radio-cards.css";

import { UserRound, UsersRound, Building2 } from "lucide-react";

import { useState, useRef, type CSSProperties } from "react";

import { Check, Plus } from "lucide-react";

import { TidalField } from "./components/ui/form-field";

import "./components/ui/form-field.css";

import { TidalButton } from "./components/ui/tidal-button";



const tidalExampleStyles = ".demo-eyebrow{font-size:11px;letter-spacing:1px;color:var(--t-muted);font-weight:500;margin:0 0 13px}\n\n.radio-specimen{width:100%;max-width:405px;border:1px solid var(--t-border);border-radius:17px;background:var(--t-surface);padding:26px;box-shadow:0 8px 24px #1f1f1f07}.radio-specimen>.demo-eyebrow{font-size:11px}.radio-specimen>h3{font-size:23px;letter-spacing:-.8px;color:var(--t-ink);margin:12px 0 25px}.radio-demo-status{font-size:11px;color:var(--t-muted);margin:17px 0 0}\n.radio-specimen{max-width:760px;border-radius:var(--t-radius-card);padding:28px;background:linear-gradient(145deg,var(--t-surface),color-mix(in srgb,var(--t-surface) 94%,var(--t-subtle)));box-shadow:0 24px 40px -28px #00000040,0 2px 4px #00000008}\n.radio-specimen>h3{font-size:28px;letter-spacing:-1px;margin:10px 0 25px}\n.workspace-demo-layout{display:grid;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:22px;align-items:stretch}\n.workspace-demo-preview{min-width:0;position:relative;overflow:hidden;border:1px solid var(--t-border);border-radius:var(--t-radius-card);padding:20px;background:radial-gradient(ellipse at 50% 10%,var(--t-surface),var(--t-subtle));box-shadow:inset 0 1px 0 #ffffff0b;display:flex;flex-direction:column}\n.workspace-demo-preview-top{display:flex;justify-content:space-between;align-items:center;gap:6px}.workspace-demo-preview-top .demo-eyebrow{font-size:11px;margin:0;letter-spacing:1px}\n.workspace-demo-state{display:flex;align-items:center;gap:4px;border:1px solid var(--t-border);padding:4px 7px;border-radius:20px;color:var(--t-muted);font-size:11px}.workspace-demo-dot{width:3px;height:3px;background:var(--t-muted);border-radius:50%}\n.workspace-demo-preview[data-created=true] .workspace-demo-state{background:var(--t-ink);color:var(--t-surface);border-color:var(--t-ink)}\n.workspace-demo-avatar{width:44px;height:44px;margin-top:22px;border:1px solid var(--t-border);border-radius:10px;background:var(--t-surface);box-shadow:0 3px 6px #00000007;position:relative;transition:background 320ms var(--t-ease-out),color 320ms var(--t-ease-out)}\n.workspace-demo-avatar svg{position:absolute;left:10px;top:10px;transition:transform 420ms var(--t-ease-spring),opacity 180ms var(--t-ease-out)}\n.workspace-demo-avatar svg:first-child{opacity:1;transform:scale(1)}.workspace-demo-avatar svg:last-child{opacity:0;transform:scale(.5)}\n.workspace-demo-avatar[data-team=true]{background:var(--t-ink);color:var(--t-surface);border-color:var(--t-ink)}.workspace-demo-avatar[data-team=true] svg:first-child{opacity:0;transform:scale(.5)}.workspace-demo-avatar[data-team=true] svg:last-child{opacity:1;transform:scale(1)}\n.workspace-demo-preview h4{font-size:21px;font-weight:550;letter-spacing:-.65px;margin:15px 0 5px;overflow-wrap:anywhere}.workspace-demo-preview>p{font-size:11px;color:var(--t-muted);line-height:1.6;margin:0 0 20px;min-height:32px}\n.workspace-demo-capacity{display:flex;justify-content:space-between;gap:8px;align-items:center}.workspace-demo-capacity>span{font-size:11px;letter-spacing:1px;color:var(--t-muted)}.workspace-demo-capacity strong{font-size:28px;letter-spacing:-1px;font-weight:500;line-height:1.12;font-variant-numeric:tabular-nums}\n.workspace-demo-digits{display:flex;align-items:baseline}.workspace-demo-digit-window{display:block;width:1ch;height:1.12em;overflow:hidden;transition:width 420ms var(--t-ease-out),opacity 180ms var(--t-ease-out);letter-spacing:0}.workspace-demo-digit-window[data-leading=true]{width:0;opacity:0}.workspace-demo-digit-window>span{display:flex;flex-direction:column;transition:transform 650ms var(--t-ease-out)}.workspace-demo-digit-window>span>span{height:1.12em;line-height:1.12;flex:none;text-align:center}\n.workspace-demo-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n.workspace-demo-seat-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin:15px 0 21px}.workspace-demo-seat-grid>span{height:26px;border-radius:5px;border:1px solid var(--t-border);color:var(--t-muted);background:var(--t-subtle);display:grid;place-items:center;opacity:.25;transform:scale(.85);transition:opacity 320ms var(--seat-delay) var(--t-ease-out),transform 420ms var(--seat-delay) var(--t-ease-spring),background 240ms var(--seat-delay),color 240ms var(--seat-delay)}.workspace-demo-seat-grid>span[data-active=true]{opacity:1;transform:scale(1);background:var(--t-ink);color:var(--t-surface);border-color:var(--t-ink)}\n.workspace-demo-summary{margin-top:auto;border-top:1px solid var(--t-border);padding-top:14px;display:flex;justify-content:space-between;gap:8px;font-size:11px;color:var(--t-muted)}\n.workspace-demo-create{margin-top:25px;padding-top:23px;border-top:1px solid var(--t-border);display:flex;gap:18px;align-items:flex-end}.workspace-demo-create>.tidal-field{flex:1;min-width:0}.workspace-demo-create>.tidal-button{min-height:48px;font-size:11px;padding-inline:15px;flex:none}.radio-demo-status{margin-top:15px;font-size:11px}\n@media(max-width:600px){.radio-specimen{padding:20px}.radio-specimen>h3{font-size:25px}.workspace-demo-layout{grid-template-columns:1fr;gap:22px}.workspace-demo-preview{padding:20px}.workspace-demo-preview>p{min-height:0}.workspace-demo-seat-grid{grid-template-columns:repeat(6,minmax(0,1fr))}.workspace-demo-create{flex-direction:column;align-items:stretch;gap:14px}.workspace-demo-create>.tidal-field{width:100%}}\n@media(max-width:600px){.workspace-demo-preview{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:8px 12px;align-items:center}.workspace-demo-preview-top{grid-column:1/-1;margin-bottom:8px}.workspace-demo-avatar{grid-column:1;grid-row:2/4;margin:0}.workspace-demo-preview h4{grid-column:2;grid-row:2;font-size:20px;margin:0}.workspace-demo-preview>p{grid-column:2;grid-row:3;margin:0;font-size:11px;line-height:1.5}.workspace-demo-capacity{grid-column:3;grid-row:2/4;flex-direction:column;align-items:flex-end;gap:4px}.workspace-demo-capacity>span{max-width:55px;text-align:right;font-size:11px;line-height:1.5}.workspace-demo-capacity strong{font-size:26px}.workspace-demo-seat-grid{grid-column:1/-1;margin:10px 0 4px}.workspace-demo-summary{grid-column:1/-1;margin:0;padding-top:12px}}\n\n.radio-specimen{container-type:inline-size}\n@container (max-width:600px){.workspace-demo-layout{grid-template-columns:1fr;gap:22px}.workspace-demo-create{flex-direction:column;align-items:stretch;gap:14px}.workspace-demo-create>.tidal-field{width:100%}}\n@container (max-width:600px){.workspace-demo-preview{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:8px 12px;align-items:center}.workspace-demo-preview-top{grid-column:1/-1;margin-bottom:8px}.workspace-demo-avatar{grid-column:1;grid-row:2/4;margin:0}.workspace-demo-preview h4{grid-column:2;grid-row:2;font-size:20px;margin:0}.workspace-demo-preview>p{grid-column:2;grid-row:3;margin:0;font-size:11px;line-height:1.5}.workspace-demo-capacity{grid-column:3;grid-row:2/4;flex-direction:column;align-items:flex-end;gap:4px}.workspace-demo-capacity>span{max-width:55px;text-align:right;font-size:11px;line-height:1.5}.workspace-demo-capacity strong{font-size:26px}.workspace-demo-seat-grid{grid-column:1/-1;margin:10px 0 4px}.workspace-demo-summary{grid-column:1/-1;margin:0;padding-top:12px}}";

export function RadioCardsDemo() {
  const [workspace, setWorkspace] = useState("personal");
  const [name, setName] = useState("Northstar");
  const [created, setCreated] = useState(false);
  const [error, setError] = useState("");
  const field = useRef<HTMLInputElement>(null);
  const capacity = workspace === "team" ? 12 : 1;
  return (
    <form
      className="radio-specimen"
      noValidate
      onSubmit={(event) => {
        event.preventDefault();
        if (name.trim().length < 2) {
          setError("Use at least two characters for the workspace name.");
          field.current?.focus({ preventScroll: true });
          return;
        }
        setError("");
        setCreated(true);
      }}
    >
      <div className="workspace-demo-layout">
        <div className="workspace-demo-choices">
          <TidalRadioCards
            label="Workspace type"
            value={workspace}
            onValueChange={(value) => {
              setWorkspace(value);
              setCreated(false);
            }}
            name="workspace"
            required
            options={[
              {
                value: "personal",
                label: "A space for you",
                description: "A private workspace for one person.",
                detail: "One member · Private by default",
                icon: UserRound,
              },
              {
                value: "team",
                label: "Team workspace",
                description: "A shared workspace for up to 12 people.",
                detail: "Up to 12 members · Shared projects",
                icon: UsersRound,
              },
              {
                value: "organization",
                label: "Across your organization",
                description: "A workspace shared across teams.",
                detail: "Coming soon",
                icon: Building2,
                disabled: true,
              },
            ]}
          />
        </div>
        <aside
          className="workspace-demo-preview"
          aria-label="Sample workspace preview"
          data-created={created}
        >
          <div className="workspace-demo-preview-top">
            <span className="demo-eyebrow">YOUR WORKSPACE</span>
            <span className="workspace-demo-state">
              {created ? (
                <Check size={11} aria-hidden="true" />
              ) : (
                <span className="workspace-demo-dot" />
              )}{" "}
              {created ? "Created" : "Preview"}
            </span>
          </div>
          <div
            className="workspace-demo-avatar"
            data-team={workspace === "team"}
          >
            <UserRound size={22} aria-hidden="true" />
            <UsersRound size={22} aria-hidden="true" />
          </div>
          <h4>{name.trim() || "Your workspace"}</h4>
          <p>
            {workspace === "team"
              ? "Shared ideas. More possibilities."
              : "A little space to make it yours."}
          </p>
          <div className="workspace-demo-capacity">
            <span>MEMBER CAPACITY</span>
            <strong>
              <span className="workspace-demo-sr">
                {capacity} {capacity === 1 ? "member" : "members"}
              </span>
              <span className="workspace-demo-digits" aria-hidden="true">
                {[Math.floor(capacity / 10), capacity % 10].map((digit, i) => (
                  <span
                    key={i}
                    className="workspace-demo-digit-window"
                    data-leading={i === 0 && digit === 0}
                  >
                    <span
                      style={{ transform: `translateY(${-digit * 1.12}em)` }}
                    >
                      {Array.from({ length: 10 }, (_, n) => (
                        <span key={n}>{n}</span>
                      ))}
                    </span>
                  </span>
                ))}
              </span>
            </strong>
          </div>
          <div className="workspace-demo-seat-grid" aria-hidden="true">
            {Array.from({ length: 12 }, (_, i) => (
              <span
                key={i}
                data-active={i < capacity}
                style={{ "--seat-delay": `${i * 32}ms` } as CSSProperties}
              >
                <UserRound size={13} />
              </span>
            ))}
          </div>
          <div className="workspace-demo-summary">
            <span>{workspace === "team" ? "Invite-only" : "Private"}</span>
            <span>
              {workspace === "team" ? "Shared projects" : "Personal projects"}
            </span>
          </div>
        </aside>
      </div>
      <div className="workspace-demo-create">
        <TidalField
          ref={field}
          label="Workspace name"
          value={name}
          required
          minLength={2}
          maxLength={32}
          error={error || undefined}
          onChange={(event) => {
            setName(event.target.value);
            setError("");
            setCreated(false);
          }}
        />
        <TidalButton type="submit">
          {created ? (
            <Check size={15} aria-hidden="true" />
          ) : (
            <Plus size={15} aria-hidden="true" />
          )}
          {created ? "Sample created" : "Create sample workspace"}
        </TidalButton>
      </div>
      <p className="radio-demo-status" role="status">
        {created
          ? `Sample ${workspace} workspace “${name.trim()}” created in this preview.`
          : `${workspace === "team" ? "Team" : "Personal"} workspace selected. Preview only.`}
      </p>
    </form>
  );
}

export default function AgentExample() {
  return (
    <div className="tidal-scope" data-theme="light" dir="ltr">
      <style>{tidalExampleStyles}</style>
      <RadioCardsDemo />
    </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."}

Controlled label, options ({value,label,description?,detail?,Lucide icon?,disabled?}[]), value, onValueChange. Optional name, required, disabled, className. Unique nonempty option values. Radix vertical arrow navigation, looping disabled-skip selection, visible group/item labels and native hidden form inputs. Consumer owns creation/persistence.
