Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>SwiftUINew to Visual Studio Code? Get it now.
SwiftUI

SwiftUI

fenki.net

|
15,552 installs
| (1) | Free
SwiftUI basic support for VS Code
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Basic SwiftUI support for VS Code

Quick & Dirty tip!

To be able to expand snippets within snippets go to Preferences > Settings and set these keys for the following values:

  • editor.suggest.snippetsPreventQuickSuggestions - false
  • editor.tabCompletion - onlySnippets

Basic usage

Snippet SwiftUI Example

What's the purpose

The primary application for this extension is to learn SwiftUI or to create simple layouts without the need to use XCode environment. Check SwiftUI tutorails from Apple. A handful of snippets to generate your SwiftUI code. Note, that at the moment it doesn't include a plethora of all available elements/modifiers. It's created mostly for education purposes. You ain't need to run an existing XCode project in XCode in order to preview. To build the preview / app you can use Or you can setup a new test target and call the build process from the commmand line:

  • Firstly, you need to setup "Unit Testing Bundle" Target in XCode project.
  • Make sure that under [Project name] >> [Device name] >> Edit Scheme… "Test" tab there is a "[Project name]Tests" added & enabled.
  • Run the command in the current directory of the project:
xcodebuild -scheme ${Project_name} test -destination "name=YourDeviceName_or_SimulatorDeviceName" -project ${Project_name}.xcodeproj
  • You can find out the connected device name or available simulator devices by running: instruments -s

What's included

// Views like:
Text(), VStack() //, etc.
// and modifiers, e.g:
.font(Font.TextStyle, design: Font.Design)
  • This package contains all neccessary code snippets to generate your UI elements swiftly.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft