# Settings page template

An assembled responsive settings page with general preferences, notification channels, appearance controls and native section navigation.

Access: pro. Category: Templates. Kind: template.

## When to use

- Use it to start a complete settings page template whose major regions should share one responsive composition.
- Choose it inside an authenticated product surface when the host application owns routing, persistence, and service calls.

## Alternatives

- Choose dashboard-layout instead when a responsive semantic dashboard shell with composable header, navigation, main content, and an in-flow mobile disclosure is the actual interface need, rather than settings page template.

## 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 Settings page template

```sh
npx shadcn@latest add @tidal-pro/settings-page-template
```

Stylesheets: `components/ui/tidal.css`, `components/ui/settings-page-template.css`.

## Minimal example

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

## Structured props

- `TidalSettingsPageTemplate.appearance: TidalSettingsPageAppearanceConfig`: Required appearance value accepted by this exported component.
- `TidalSettingsPageTemplate.general: TidalSettingsPageGeneralConfig`: Required general value accepted by this exported component.
- `TidalSettingsPageTemplate.notifications: TidalSettingsPageNotificationsConfig`: Required notifications value accepted by this exported component.
- `TidalSettingsPageTemplate.title: ReactNode`: Required title value accepted by this exported component.
- `TidalSettingsPageTemplate.description?: ReactNode`: Optional description value accepted by this exported component.
- `TidalSettingsPageTemplate.eyebrow?: ReactNode`: Optional eyebrow value accepted by this exported component.
- `TidalSettingsPageTemplate.footer?: ReactNode`: Optional footer value accepted by this exported component.
- `TidalSettingsPageTemplate.navigation?: TidalSettingsPageNavigation | undefined`: Optional navigation value accepted by this exported component.

## Complete usage example

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

```tsx
"use client";

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

import { useState } from "react";

import { TidalSettingsPageTemplate, type TidalSettingsPageGeneralConfig, type TidalSettingsPageNotificationsConfig } from "./components/ui/settings-page-template";

import "./components/ui/settings-page-template.css";

import "./components/ui/settings-panel.css";

import "./components/ui/notification-preferences.css";

import "./components/ui/color-picker.css";



const tidalExampleStyles = ".settings-page-template-demo {\n  width: 100%;\n  min-width: 0;\n}\n\n.settings-page-template-demo .tidal-settings-page-footer p {\n  margin: 0;\n}";

type Density = "comfortable" | "compact";

interface GeneralValues {
  density: Density;
  weeklySummary: boolean;
}

const INITIAL_GENERAL: GeneralValues = {
  density: "comfortable",
  weeklySummary: true,
};

const INITIAL_NOTIFICATIONS: Readonly<Record<string, boolean>> = {
  "assignment:in-app": true,
  "assignment:email": false,
  "review:in-app": true,
  "review:email": true,
};

const CHANNELS = [
  { id: "in-app", label: "In app", accessibleLabel: "In-app sample" },
  { id: "email", label: "Email", accessibleLabel: "Email sample" },
] as const;

const PRESETS = [
  { id: "ink", value: "#171717", label: "Ink", accessibleLabel: "Use ink" },
  {
    id: "graphite",
    value: "#444444",
    label: "Graphite",
    accessibleLabel: "Use graphite",
  },
  {
    id: "stone",
    value: "#737373",
    label: "Stone",
    accessibleLabel: "Use stone",
  },
] as const;

export function SettingsPageTemplateDemo() {
  const [general, setGeneral] = useState<GeneralValues>(INITIAL_GENERAL);
  const [appliedGeneral, setAppliedGeneral] =
    useState<GeneralValues>(INITIAL_GENERAL);
  const [notifications, setNotifications] = useState<Record<string, boolean>>({
    ...INITIAL_NOTIFICATIONS,
  });
  const [savedNotifications, setSavedNotifications] = useState<
    Record<string, boolean>
  >({ ...INITIAL_NOTIFICATIONS });
  const [color, setColor] = useState("#171717");
  const [status, setStatus] = useState("Sample settings are ready.");

  const generalConfig: TidalSettingsPageGeneralConfig = {
    title: "General",
    description: "Choose how this fictional workspace preview is arranged.",
    groups: [
      {
        id: "workspace-view",
        title: "Workspace view",
        fields: [
          {
            id: "density",
            kind: "select",
            name: "density",
            label: "Navigation density",
            value: general.density,
            options: [
              { value: "comfortable", label: "Comfortable" },
              { value: "compact", label: "Compact" },
            ],
            onValueChange: (value) => {
              setGeneral((current) => ({
                ...current,
                density: value as Density,
              }));
              setStatus("General draft changed locally.");
            },
          },
          {
            id: "weekly-summary",
            kind: "toggle",
            name: "weeklySummary",
            label: "Weekly summary",
            description: "Include a summary in this sample configuration.",
            checked: general.weeklySummary,
            onCheckedChange: (checked) => {
              setGeneral((current) => ({
                ...current,
                weeklySummary: checked,
              }));
              setStatus("General draft changed locally.");
            },
          },
        ],
      },
    ],
    onSubmit: (event: import("react").FormEvent<HTMLFormElement>) => {
      event.preventDefault();
      setAppliedGeneral(general);
      setStatus("General sample applied to the summary below.");
    },
    onReset: () => {
      setGeneral(INITIAL_GENERAL);
      setAppliedGeneral(INITIAL_GENERAL);
      setStatus("General sample reset.");
    },
    applyLabel: "Apply general sample",
    resetLabel: "Reset general sample",
  };

  const notificationConfig: TidalSettingsPageNotificationsConfig = {
    title: "Notifications",
    description: "Choose where fictional project updates appear.",
    channels: CHANNELS,
    groups: [
      {
        id: "project-updates",
        title: "Project updates",
        preferences: [
          {
            id: "assignment",
            label: "Task assigned",
            accessibleLabel: "Task assigned",
            controls: CHANNELS.map((channel) => ({
              channelId: channel.id,
              checked: notifications[`assignment:${channel.id}`] ?? false,
            })),
          },
          {
            id: "review",
            label: "Review requested",
            accessibleLabel: "Review requested",
            controls: CHANNELS.map((channel) => ({
              channelId: channel.id,
              checked: notifications[`review:${channel.id}`] ?? false,
            })),
          },
        ],
      },
    ],
    onPreferenceChange: (preference, channel, checked) => {
      setNotifications((current) => ({
        ...current,
        [`${preference.id}:${channel.id}`]: checked,
      }));
      setStatus("Notification draft changed locally.");
    },
    onSave: (event) => {
      event.preventDefault();
      setSavedNotifications({ ...notifications });
      setStatus("Notification sample applied to the summary below.");
    },
    resetAction: {
      label: "Reset notification sample",
      onAction: () => {
        setNotifications({ ...INITIAL_NOTIFICATIONS });
        setSavedNotifications({ ...INITIAL_NOTIFICATIONS });
        setStatus("Notification sample reset.");
      },
    },
    labels: { save: "Apply notification sample" },
  };

  const enabledDeliveryCount =
    Object.values(savedNotifications).filter(Boolean).length;

  return (
    <section
      className="settings-page-template-demo"
      aria-label="Settings page template preview"
    >
      <TidalSettingsPageTemplate
        title="Workspace settings"
        description="Review general preferences, notification channels and the sample interface color in one responsive page."
        general={generalConfig}
        notifications={notificationConfig}
        appearance={{
          title: "Appearance",
          description:
            "Choose a neutral supplied value or enter a six-digit hex value.",
          value: color,
          presets: PRESETS,
          required: true,
          hint: "Use six hexadecimal digits.",
          onValueChange: (value) => {
            setColor(value);
            setStatus("Appearance sample changed locally.");
          },
          resetAction: {
            label: "Reset appearance sample",
            accessibleLabel: "Reset appearance sample to ink",
            onAction: () => {
              setColor("#171717");
              setStatus("Appearance sample reset to ink.");
            },
          },
        }}
        footer={
          <p role="status" aria-live="polite" aria-atomic="true">
            {status} Applied view: {appliedGeneral.density}, weekly summary{" "}
            {appliedGeneral.weeklySummary ? "on" : "off"}; notification channels
            on: {enabledDeliveryCount}; color: {color}. Fictional local sample
            only.
          </p>
        }
      />
    </section>
  );
}

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

title is required and renders the page h1 inside a content div, avoiding an implicit nested main landmark. Optional eyebrow and description preserve numeric zero. general, notifications and appearance are required typed configurations inferred from @tidal-pro/settings-panel, @tidal-pro/notification-preferences and @tidal-pro/color-picker; the template owns their h2 hierarchy and forwards their remaining controlled native contracts. Optional navigation supplies a label and per-section labels, disabled state, native anchor attributes and refs for three real generated section destinations. Navigation href and children remain owned by the template. Resolved disabled links prevent navigation before caller handling while explicit aria-disabled=false is preserved. Optional footer and root native div attributes/ref remain consumer-owned. The template performs no setting mutation, delivery, account, request, routing, network, storage or persistence action.
