# 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")
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://swift-packages.gitbook.io/materialuikit/components/separator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
