# Separator preview

Interactive preview of the CyberSpec Separator component. A rule with tick marks, plain, labelled or vertical.

[View Separator preview on CyberSpec](https://www.cyberspec.dev/preview/separator)

## About this preview

Separator belongs to the Layout group in the CyberSpec catalog. It uses @ui-sdk/react/separator.

## Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/separator.json
```

## Example

```tsx
"use client"

import { Separator } from "@/components/ui/separator"

const stats = [
  { value: "12", label: "Nodes" },
  { value: "03", label: "Traces" },
  { value: "0.4s", label: "Lag" },
]

export default function SeparatorDemo() {
  return (
    <div style={{ display: "grid", gap: 10, width: "100%", maxWidth: 280, textAlign: "start" }}>
      <div>
        <p data-kit="label">Vanta Mk.II deck</p>
        <p data-kit="hint">Ilya Brandt's bench, the Stacks</p>
      </div>
      <Separator />
      <p data-kit="hint">Reflashed last night. Two routes held open, one burned.</p>
      <Separator label="Uplinks" />
      <div style={{ display: "flex", justifyContent: "space-between", gap: 8 }}>
        {stats.map((stat, index) => (
          <div key={stat.label} style={{ display: "contents" }}>
            {index > 0 && <Separator orientation="vertical" />}
            <div style={{ display: "grid", gap: 2 }}>
              <span data-kit="value">{stat.value}</span>
              <span data-kit="hint">{stat.label}</span>
            </div>
          </div>
        ))}
      </div>
      <Separator label="End of log" align="center" decorative />
    </div>
  )
}
```

## Install this example

```sh
bunx --bun shadcn@latest add https://www.cyberspec.dev/r/separator-demo.json
```

## Resources

- [Separator documentation](https://www.cyberspec.dev/components/sidebar/separator.md)
- [Component catalog](https://www.cyberspec.dev/components.md)
- [Separator source code](https://github.com/agnelnieves/cyberspec/blob/main/registry/cyber/ui/separator.tsx)
- [Shadcn registry item](https://www.cyberspec.dev/r/separator.json)
