> For the complete documentation index, see [llms.txt](https://swift-packages.gitbook.io/materialuikit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swift-packages.gitbook.io/materialuikit/components/separator.md).

# Separator

### Overview

The `Separator` view creates a styled divider that can be used to visually separate sections in your layout. By default, it displays a horizontal separator, but it can also be configured to display a vertical separator.

To you use `Separator`, initialize it  with or without specifying its orientation.

### Initializer

Creates a separator with default horizontal orientation.

```swift
Separator()
```

Creates a separator with the custom orientation.

```swift
Separator(orientation: SeparatorOrientationStyle)
```

> For detailed descriptions of the available orientation styles, refer to the [SeparatorOrientationStyle](/materialuikit/components/separator/separatororientationstyle.md).

### Parameter

<table><thead><tr><th width="169">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>orientation</code></td><td>The orientation of the separator.</td></tr></tbody></table>

### Example

Displays a  default horizontal oriented separator.

```swift
Container {
    Text("Section 1")
    Separator()
    Text("Section 2")
}
```

Displays a custom oriented separator.

```swift
HStack {
    Text("Section 1")
    Separator(orientation: .vertical)
    Text("Section 2")
}
```
