Documentation for Nativscript UI



I have just strated building apps in NativeScript. Its very easy to understand all the details provided on the websites.

I am facing issues while creating a new layout with the NativeScript components and attributes. I think as a HTML developer its hard to create layouts in NativScript. First I have to learn all the elements to create a layout and its not easy to understand on the given details.

I dont know which element to use while creating a layout, I saw many examples and have a understanding of basic layout. For example “page” tag and “StackLayout” tag. But still there is lot of tags in NativeScript.

In the above link I have read all the components. For example if I need to add paragraph what tag I have to use ?

Is there any breif link about the detailed components and attributes for NativeScript? or any examples for every element how to use it?


In your case for a paragraph for example, you will be using a text view and you will style as desired.
for the second question see this page for full API reference for example here are all the properties and methods available for text-view


Here is the simple way that I have used. You can add paragraphs with the label layout item. Below is code similar to what I have used in my app. Put these inside of a StackLayout or other layout.

You can use CSS to control the text attributes and also use specific inline control. textWrap will get you a paragraph style for lots of text. Along with margin and horizontalAlignment.

   <label class="courseheader" text="Great Course" margin="4" horizontalAlignment="center" />
   <label class="coursedesc" text="Lots and lots of text. Lots and lots of text. Lots and lots of text."margin="20" horizontalAlignment="center" textWrap="true" />


Dear @ganas and @KDS,

Thanks for replying quickly.

I am aware about the api references and read all the detailed info there. What I am looking for is like @KDS share an example of label with multiple attributes. It seems a better way to understand and use every element to create a layout.

Right now Its hard for me to search and read all attributes. because i dont know how to use it. All i am doing is experiments with elements. But its taking to much time to test every element and I’m recreating the layouts.

So is there any examples or sample layouts we have ? Just to understand how elements work to create layouts in XML.

Really appreciate the help! :+1:


They are kind of lacking in that regard. Every time I’m reading the docs I’m like “OK, that’s the code, but where’s a visual example about this?”

Anyway, whatever you don’t find in the docs you can find elsewhere. It’s difficult, but not impossible. It takes some time.

NS Blog:
NS Snacks:
Nativescripting (lessons):
Slack (chat):

And also countless developer blogs, this forum, lessons in sites like Udemy, Platzi, etc.

I’d prefer to have a more concise and complete documentation in a single place, with more (visual) examples and somewhat more up to date. But whatever… if you commit you can get what you need around the web.

Check the resources I mentioned and you may find what you’re looking for.


Totally agree with you @gabitoesmiapodo

But as you said need a complete documentation with more (visual) examples. This will make the process better and fast.

Rest I am trying let see. Its fun!

Thanks for your suggestion will definitely look into above mention links.