layout/DSDivider

DSDivider

layout
since v1.0

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

iOS 17+macOS 14+

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').
axisAxis.horizontalHorizontal or vertical.
colorColorDSColor.borderLine colour.

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