Feedback/DSSkeleton
DSSkeleton
feedbackPulsing placeholder shapes that mimic the layout of content while it loads.
iOS 17+macOS 14+
Purpose
Reduce perceived loading time and layout shift. Use instead of a spinner whenever the layout is known.
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 |
|---|---|---|---|
| width | CGFloat? | nil | Fixed width. nil = full width. |
| heightreq | CGFloat | โ | Shape height. |
| radius | CGFloat | DSRadius.small | Corner radius. |
Examples
Card skeleton
Placeholder matching a content card layout.
swift
DSSkeletonCard() // pre-built card placeholder
// Or custom layout:
VStack(alignment: .leading, spacing: DSSpacing.sm) {
DSSkeleton(height: 16, radius: DSRadius.small) // title
DSSkeleton(width: 120, height: 12, radius: DSRadius.small) // subtitle
}