NativeScript Snippets
Angular · Core (XML) · Vue · React · Svelte
Every NativeScript UI component, layout, gesture, and iOS icon — as a snippet, in your flavor's syntax. Stop hand-typing
Full prefix reference → · Snippet spec & generation pipeline → Quick Start
Highlights
UsageEvery component and layout ships in three variants. Here's the same 1. Bare —
|
| Prefix | Angular | Core | Vue | React | Svelte |
|---|---|---|---|---|---|
ns-tap |
(tap)="" |
tap="" |
@tap="" |
onTap={} |
on:tap={} |
…plus ns-doubleTap, ns-longPress, ns-swipe, ns-pan, ns-pinch, ns-rotation, and ns-touch.
iOS system icons (Angular + Core)
ns-icon-* expands to the numeric ios.systemIcon value for an ActionItem — e.g. ns-icon-stop → 14:
<ActionItem ios.systemIcon="14"></ActionItem>
24 icons in all (ns-icon-done, ns-icon-search, ns-icon-trash, …) — see reference.md for the complete list.
Snippets
This extension contributes 805 snippets across five NativeScript flavors, generated from @nativescript/core v9.0.20. See reference.md for the full prefix tables.
| Flavor | Language id(s) | Snippets |
|---|---|---|
| Angular | html |
182 |
| Core (XML) | xml |
179 |
| Vue | vue |
149 |
| React | typescriptreact, javascriptreact |
143 |
| Svelte | svelte |
152 |
Vue and Svelte snippets require the Vue (Volar) and Svelte language extensions respectively — without them VS Code has no
vue/sveltelanguage to attach to, and the snippets stay dormant until installed.
Variants
| Prefix | Expands to |
|---|---|
ns-<name> |
the bare element |
ns-<name>-prop |
element + its primary properties as tab-stops |
ns-<name>-comp |
properties + events + a documented property/event table |
ns-<layout>-snippet-N |
(layouts only) a complete ready-made example layout |
Most prefixes work in every flavor; a few are flavor-specific: ActionBarExtension (Angular only), NavigationButton (not in React), Repeater (not in Vue and React), RootLayout (not in React), SplitView (Angular/Core only).
The same prefix per flavor
| Flavor | Language id(s) | per-flavor syntax (illustrative — tag case + property + event) |
|---|---|---|
| Angular | html |
<Button text="…" (tap)="onTap()"> |
| Core | xml |
<Button text="…" tap="onTap" /> |
| Vue | vue |
<Button text="…" @tap="onTap" /> |
| React | typescriptreact, javascriptreact |
<button text="…" onTap={onTap} /> |
| Svelte | svelte |
<button text="…" on:tap={onTap} /> |
Installation
Requires VS Code 1.30.0 or later.
- Marketplace: Extensions view (Cmd/Ctrl+Shift+X) → search NativeScript Snippets by ElecTreeFrying → Install.
- CLI:
code --install-extension ElecTreeFrying.nativescript-angular-html-snippets - Direct: VS Code Marketplace listing
- Cursor / Windsurf / VSCodium / Gitpod: Search NativeScript Snippets in the Extensions panel — served via Open VSX.
Compatibility
- VS Code: 1.30.0 or later.
- Registries: Available on both the VS Code Marketplace and Open VSX.
- Compatible hosts: Cursor, Windsurf, VSCodium, Gitpod, Code Server, and other forks that implement the VS Code API at the same engine version — installable directly from their Extensions panel via Open VSX.
- Web: Runs on vscode.dev and github.dev — it's a pure declarative extension, so there's no native code to hold it back.
- Languages: Angular (
html), Core (xml), and React (typescriptreact/javascriptreact) work out of the box; Vue and Svelte require the Vue (Volar) / Svelte language extensions. - Footprint: Pure declarative snippet JSON — zero runtime dependencies.
- Telemetry: None. Everything runs locally.
Troubleshooting
If a prefix doesn't expand, snippets don't appear in .vue / .svelte files, or a .vue template inserts the Angular form ((tap) instead of @tap) — see SUPPORT.md for symptom → cause → fix.
That includes the common case where Svelte snippets fire between elements but not inside an element's opening tag.
Still stuck? Please open an issue on GitHub Issues.
Changelog
See CHANGELOG.md for full release notes.
Contributing
Contributions, bug reports, and feature requests are welcome in GitHub Issues. Snippets are generated, not hand-written — see SUPPORT.md for the build/validate workflow and the architecture overview.
See SPEC.md for the snippet grammar and generation pipeline — behavior changes belong there too.
Support
This extension is free and always will be. If it's become part of your workflow, here are a few ways to give back:
- Star the repo on GitHub
- Leave a review on the VS Code Marketplace
- Send a donation to any address below
| Network | Address |
|---|---|
| Bitcoin | bc1q4j2uewfphjmca83905qv37vcl4jh8va5yupl7w |
| Solana | EHtTGyRoDAK44KBGrEoypAWyPpResHUqwufKnuLs7Tyy |
| Sui | 0xcaf8ff4a65d7e35d961abd0203180013b7fe974d4fa0313e880c39c45ada2b09 |
| ERC-20 (Ethereum / Base / Monad / Polygon / HyperEVM) | 0xd25f84Ed2F76dF2F0C8f1207402eF9e15b5d7855 |
Related
- All extensions by ElecTreeFrying on the VS Code Marketplace.





