MaterialUIKit
Github
  • MaterialUIKit
  • Essentials
    • Configuring and Personalizing
    • Defining a Custom Color Schemes
  • Configuration and Color Schemes
    • MUIKitConfiguration
    • MUIKitColorScheme
  • Components
    • Action Button
      • ActionButtonStyle
    • Checkbox
    • Collection
      • CollectionStyle
    • Container
    • Date Selector
    • Dialog
    • Dialog Sheet
    • Dropdown Menu
      • Dropdown Menu Label
    • FAB
    • Icon Button
      • IconButtonStyle
    • Navigation Container
      • NavigationContainerHeaderStyle
      • Navigation Route
      • Navigation Route Label
    • Progress Bar
    • Radio Buttons Group
    • Search Box
    • Secure Text Box
    • Segmented Buttons
    • Separator
      • SeparatorOrientationStyle
    • Snackbar
    • Switch
    • Time Selector
    • Text Box
    • Tab Bar
      • TabBar Item
Powered by GitBook
On this page
  • Overview
  • Initializer
  • Parameter
  • Example
  1. Components

Separator

Represents a Material UI styled separator for dividing sections within a view.

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.

Separator()

Creates a separator with the custom orientation.

Separator(orientation: SeparatorOrientationStyle)

For detailed descriptions of the available orientation styles, refer to the SeparatorOrientationStyle.

Parameter

Parameter
Description

orientation

The orientation of the separator.

Example

Displays a default horizontal oriented separator.

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

Displays a custom oriented separator.

HStack {
    Text("Section 1")
    Separator(orientation: .vertical)
    Text("Section 2")
}
PreviousSegmented ButtonsNextSeparatorOrientationStyle

Last updated 10 months ago