layout/DSDivider

DSDivider

layout
since 0.1.0

Horizontal or vertical rule using DSColor.border, with optional label.

iOS 17+macOS 14+watchOS 10+tvOS 17+visionOS 1+

Purpose

Visual separation between content sections or within lists.

Interactive Reference

Live showroom

Need the full visual surface?

Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().

Best for exploring:

variants, states, categories, and real app examples in one place.

Props

PropTypeDefaultDescription
labelString?nilCentred label (e.g. "OR").
thicknessCGFloat1Line thickness.
colorColor?nilLine color. nil uses the theme border color.

Examples

Login divider

OR divider between login methods.

swift
DSButton("Continue with Apple", variant: .secondary, icon: "apple.logo", action: signInWithApple)
DSDivider(label: "or")
DSTextField(placeholder: "Email", text: $email)

Related Components