📋 Swift/Kotlin Output - Native Mobile Constants (vibe-kanban)#3
Open
toadkicker wants to merge 1 commit intomainfrom
Open
📋 Swift/Kotlin Output - Native Mobile Constants (vibe-kanban)#3toadkicker wants to merge 1 commit intomainfrom
toadkicker wants to merge 1 commit intomainfrom
Conversation
…stants Adds a new output adapter that generates native iOS (Swift/SwiftUI) and Android (Kotlin/Compose) constant files from design tokens. - Color constants as SwiftUI `Color(red:green:blue:opacity:)` initializers - Spacing/dimension constants as `CGFloat` values - Typography as `Font.system(size:weight:)` definitions - Shadow configurations with custom `ShadowStyle` struct + View extension - Gradient support (LinearGradient, RadialGradient, AngularGradient) - Optional UIKit extension (`UIColor` versions) - Valid camelCase identifiers with reserved word escaping - Color constants as Compose `Color(r, g, b, a)` or hex `Color(0xAARRGGBB)` - Spacing/dimension constants with `dp` units - Font sizes with `sp` units for accessibility - Typography as `TextStyle` configurations - Shadow elevation values - Gradient support via `Brush` API - Region comments for code organization ```typescript // Convenience function const output = await figmaToSwiftKotlin(input, options); // Or via adapter const adapter = createSwiftKotlinAdapter(); const output = await adapter.transform(theme, options); // Access generated files output.files['DesignTokens.swift'] // SwiftUI constants output.files['DesignTokens.kt'] // Compose constants output.files['DesignTokens+UIKit.swift'] // Optional UIKit extension ``` - `swiftTypeName`: Customize Swift enum name (default: 'DesignTokens') - `kotlinObjectName`: Customize Kotlin object name (default: 'DesignTokens') - `kotlinPackage`: Set package name (default: 'com.design.tokens') - `includeUIKit`: Generate UIKit extensions (default: false) - `includeComments`: Include description comments (default: true) - `hexColors`: Use hex color format for Kotlin (default: false) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Category: Output
Effort: Medium
Priority: Backlog
Native mobile platform constants for Swift (iOS) and Kotlin (Android).