Feedback/DSSkeletonCard
DSSkeletonCard
feedbackCard-shaped skeleton placeholder with pulsing animation for loading states.
iOSmacOS
Purpose
Use as placeholder while card content is loading. Provides better UX than spinners.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| height | CGFloat | 120 | Card height |
| cornerRadius | CGFloat | DSRadius.large | Corner radius |
Examples
Loading cards
Show skeleton cards while data loads.
swift
if isLoading {
VStack(spacing: DSSpacing.md) {
DSSkeletonCard(height: 140)
DSSkeletonCard(height: 140)
DSSkeletonCard(height: 140)
}
} else {
ForEach(items) { item in
ItemCard(item)
}
}Usage Guidelines
- Match skeleton dimensions to actual content
- Use multiple skeletons to show expected layout
- Prefer skeletons over spinners for better perceived performance
- Ensure smooth transition when content loads