To let you access the native deviceand platform capabilities of your target platform, NativeScript uses a modulardesign pattern. All device, platform or user interface functionalities residein separate modules. To access the functionality provided by a module, you needto require the module.
In your project, the files for eachmodule reside in a dedicated subdirectory in the tns_modules directory.Each default module comes along with a package.json filewhich declares how the module should be called within your call and which filecontains its respective code.
{ "name" : "button",
"main" : "button.js" }
ImageSource
class which encapsulates the common abstraction behind a platform-specific object that is used as a source for images (typically a Bitmap).Cache
class which handles image download requests and caches the already downloaded images.GesturesObserver
class which lets you observe and respond to user gestures.Observable
class which represents an observable object or data in the MVVM paradigm.ObservableArray
class which detects and responds to changes in a collection of objects.VirtualArray
class which is an advanced array-like class that helps loading items on demand.DependencyObservable
class which represents an extended Observable
object that uses Property instances for value backing mechanism.Frame
class which represents the logical View
unit that is responsible for navigation within an application.Page
class which represents a logical unit for navigation inside a Frame
. NativeScript apps consist of pages.FormattedString
and Span
classes which you can use to create rich text formatted strings.XmlParser
class which is a SAX parser using the easysax implementation.Style
class which is responsible for the visual appearance of elements.Border
class which lets you draw borders around other elements.StackLayout
class which lets you arrange the children of the layout in single line.GridLayout
class which lets you arrange the children of the layout in a flexible grid area with columns and rows.AbsoluteLayout
class which lets you arrange the children of the layout at arbitrary positions or draw them in multiple layers.WrapLayout
class which lets you arrange the children of the layout at sequential positions from left to right and then wrap the lines of children from top to bottom.ActivityIndicator
class which represents a widget for showing that a service is currently busy.Button
class which is a standard button widget.Label
class which is a standard label widget.TextField
class which represents an editable single-line box.TextView
class which represents an editable multi-line line box.ListView
class which represents a standard list view widget.Image
class, which represents an image widget.Progress
class which represents a progress or loading indicator.ScrollView
class which represents a scrollable area that can show content which is larger than the visible area.SearchBar
class which represents a standard search bar component.Slider
class which represents a standard slider component.Switch
class which represents a standard switch component.TabView
class which represents a standard content component with tabs.WebView
class which represents a standard browser widget.