# Separator

A horizontal or vertical divider with decorative and semantic modes.

Access: free. Category: Essentials. Kind: primitive.

## When to use

- Use it when a product interface needs a horizontal or vertical divider with decorative and semantic modes.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.

## Alternatives

- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than separator.

## 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 Separator

```sh
npx shadcn@latest add https://tidalui.com/r/separator.json
```

Stylesheets: `components/ui/tidal.css`, `components/ui/separator.css`.

## Minimal example

```tsx
import"./components/ui/tidal.css";
import"./components/ui/separator.css";
import{TidalSeparator}from"./components/ui/separator";
export default()=><div className="tidal-scope"><TidalSeparator/></div>;
```

## Structured props

- `TidalSeparator.decorative?: boolean | undefined` (default true): Optional decorative value accepted by this exported component.
- `TidalSeparator.orientation?: "horizontal" | "vertical" | undefined` (default "horizontal"): Optional orientation value accepted by this exported component.

## Complete usage example

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

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



const tidalExampleStyles = ".tidal-scope .separator-demo {\n  width: 100%;\n  max-width: 440px;\n  min-width: 0;\n  display: grid;\n  gap: 23px;\n}\n.tidal-scope .separator-demo-header {\n  display: flex;\n  flex-wrap: wrap;\n  gap: 8px 20px;\n  align-items: baseline;\n  justify-content: space-between;\n}\n.tidal-scope .separator-demo-header strong {\n  font-size: 16px;\n  font-weight: 580;\n  color: var(--t-ink);\n}\n.tidal-scope .separator-demo-header span,\n.tidal-scope .separator-demo > p {\n  font-size: 12px;\n  color: var(--t-muted);\n  margin: 0;\n}\n.tidal-scope .separator-demo-stats {\n  display: flex;\n  gap: 18px;\n  margin: 0;\n  min-width: 0;\n}\n.tidal-scope .separator-demo-stats > dl {\n  flex: 1;\n  margin: 0;\n  min-width: 0;\n}\n.tidal-scope .separator-demo-stats dt {\n  font-size: 11px;\n  color: var(--t-muted);\n  overflow-wrap: anywhere;\n}\n.tidal-scope .separator-demo-stats dd {\n  font-size: 18px;\n  margin: 6px 0 0;\n  color: var(--t-ink);\n  overflow-wrap: anywhere;\n}\n@media (max-width: 360px) {\n  .tidal-scope .separator-demo-stats {\n    gap: 10px;\n  }\n  .tidal-scope .separator-demo-stats dd {\n    font-size: 16px;\n  }\n}";

export function SeparatorDemo() {
  return (
    <div className="separator-demo">
      <div className="separator-demo-header">
        <strong>Workspace</strong>
        <span>Product team</span>
      </div>
      <TidalSeparator decorative={false} aria-label="Workspace summary" />
      <div className="separator-demo-stats">
        <dl>
          <dt>Members</dt>
          <dd>12</dd>
        </dl>
        <TidalSeparator orientation="vertical" />
        <dl>
          <dt>Projects</dt>
          <dd>4</dd>
        </dl>
        <TidalSeparator orientation="vertical" />
        <dl>
          <dt>Storage</dt>
          <dd>2.4 GB</dd>
        </dl>
      </div>
      <TidalSeparator />
      <p>Shared with your team</p>
    </div>
  );
}

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

{"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."}

Native div attributes and ref, horizontal/vertical orientation, and decorative (true by default). Decorative dividers are hidden from assistive technology; semantic mode exposes role=separator and its orientation, with an optional native aria-label. Horizontal separators fill the container width; vertical separators stretch in a flex row with a one-em minimum. Set the containing row height or pass a native style height when needed. Children, role, aria-hidden and aria-orientation are owned by the divider. No focus stop or user interaction is added. Colors use the shared border token and remain visible in forced colors.
