layout/DSDivider
DSDivider
layoutHorizontal 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
| Prop | Type | Default | Description |
|---|---|---|---|
| label | String? | nil | Centred label (e.g. "OR"). |
| thickness | CGFloat | 1 | Line thickness. |
| color | Color? | nil | Line 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)