Getting Started
Creating a New Project
Try it online β
You can play with NativeScript online directly on StackBlitz, or locally using NativeScript Preview.
Summary β
NativeScript allows scaffolding projects with various templates to kickstart your app development.
Official templates can be found in the Templates GitHub repository and on NPM.
Some of the templates are listed in the NativeScript CLI when creating a new project with ns create
, others may be used by passing the --template
flag with the template name (NPM package name).
nscreatemyCoolApp
If you would like to try one of the other templates not listed by ns create
run:
nscreatemyCoolApp--template<template-package-nameorpath-to-template>
TIP
If you want to skip the interactive prompts, you can pass the following flags:
nscreatemyCoolApp--angular//or--ngforshort
nscreatemyCoolApp--vue
nscreatemyCoolApp--vue--ts//forvuewithtypescript
nscreatemyCoolApp--react
nscreatemyCoolApp--js
nscreatemyCoolApp--svelte
...to create the app with the default template for the specified flavor.
Official Starter Templates β
Blank Template β
A basic template with a single page and no custom styles.
To use, run:
nscreatemyCoolApp--template@nativescript/template-blank
Drawer Template β
A template with a side drawer.
To use, run:
nscreatemyCoolApp--template@nativescript/template-drawer-navigation
Tabs Template β
A template with multiple tabs.
To use, run:
nscreatemyCoolApp--template@nativescript/template-tab-navigation
List & Details Template β
A template with a ListView and a details screen.
To use, run:
nscreatemyCoolApp--template@nativescript/template-master-detail
Creating custom templates β
The NativeScript CLI can create projects from npm
packages or local folders by passing the --template <npm_package_name_or_local_path>
flag to the ns create
command. If you need a custom template, start with one of the official templates and customize it for your needs.
- Previous
- Environment Setup
- Next
- Choosing an editor
Last updated: