The iOS component library for the Cuda Design System, built with SwiftUI and distributed via Swift Package Manager.
This repository follows the Skyscanner backpack-ios architecture pattern. For design tokens source-of-truth, specifications, and architectural decisions, see the main cds repository.
Add cuda-iOS as a Swift Package dependency in Xcode:
- File > Add Package Dependencies
- Enter the repository URL
- Import the libraries you need:
import Cuda_SwiftUI // SwiftUI components
import Cuda_Common // Shared utilities
import Cuda_Tokens // Design tokens
import Cuda_Fonts // Typographycuda-iOS/
├── Package.swift # SPM manifest (4 library targets)
├── Sources/
│ ├── Cuda-SwiftUI/ # SwiftUI components
│ │ ├── Button/ # One folder per component
│ │ │ └── __figma__/ # Figma Code Connect files
│ │ ├── Card/
│ │ ├── Badge/
│ │ └── ... (39 component folders)
│ ├── Cuda-Common/ # Shared utilities
│ ├── Cuda-Tokens/ # Design tokens (colors, spacing, typography)
│ └── Cuda-Fonts/ # Font resources
├── Tests/
├── Example/ # Sample app
├── scripts/ # Build & automation
└── decisions/ # Architectural decision records
| Component | Component | Component |
|---|---|---|
| AppSearchModal | Badge | BannerAlert |
| BottomSheet | Button | Calendar |
| Card | CardButton | Carousel |
| Chip | ChipGroup | Color |
| Dialog | FieldSet | Font |
| Icons | Link | NavigationBar |
| Nudger | Overlay | PageIndicator |
| Panel | Price | ProgressBar |
| Rating | SearchInput | SectionHeader |
| SegmentedControl | Select | Skeleton |
| Slider | Snippet | Spacing |
| Spinner | StarRating | Switch |
| Text | TextArea | TextField |
Each component folder contains a __figma__/ subdirectory with a [ComponentName].figma.swift file for Figma Code Connect integration.
Sources/Cuda-SwiftUI/Button/
├── Button.swift # Component implementation
└── __figma__/
└── Button.figma.swift # Figma Code Connect mapping
- Navigate to the component's
__figma__/directory - Open the
.figma.swiftplaceholder file - Uncomment the template code
- Replace
REPLACE_WITH_FILE_IDandREPLACE_WITH_NODE_IDwith your Figma component's URL - Map Figma properties to your SwiftUI component using property wrappers:
@FigmaString("Property Name")— text properties@FigmaBoolean("Property Name")— boolean flags@FigmaEnum("Property Name", mapping: [...])— variant selections@FigmaInstance("Property Name")— instance swaps
npm install -g @figma/code-connect
figma connect publish --token YOUR_FIGMA_ACCESS_TOKEN# Create component folder with Figma Code Connect placeholder
mkdir -p Sources/Cuda-SwiftUI/NewComponent/__figma__
# Add your component Swift file
# Sources/Cuda-SwiftUI/NewComponent/NewComponent.swift
# Add Figma Code Connect file
# Sources/Cuda-SwiftUI/NewComponent/__figma__/NewComponent.figma.swift- cds — Main design system hub (web components, tokens source-of-truth, specs)
- cuda-android — Android component library (planned)