layout/DSDivider
DSDivider
layoutHorizontal 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
| Prop | Type | Default | Description |
|---|---|---|---|
| label | String? | nil | Centred label (e.g. 'OR'). |
| axis | Axis | .horizontal | Horizontal or vertical. |
| color | Color | DSColor.border | Line 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)