nativescript-rtl / ui

Licence: MIT license
Add right-to-left support to the NativeScript framework

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ui

nativescript-pushy
Easy push notifications for your NativeScript app!
Stars: ✭ 19 (-13.64%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-clipboard
📋 NativeScript plugin to copy stuff to the device clipboard, and read from it again
Stars: ✭ 40 (+81.82%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-taptic-engine
📳 Use Apple's Taptic Engine to vibrate your iPhone 6s (and up) in a variety of ways
Stars: ✭ 16 (-27.27%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-menu
A plugin that adds a pop-up menu to NativeScript
Stars: ✭ 17 (-22.73%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-fabric
Handling App URLs in nativescript apps
Stars: ✭ 29 (+31.82%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-apple-sign-in
Sign In With Apple, as seen on WWDC 2019, available with iOS 13
Stars: ✭ 37 (+68.18%)
Mutual labels:  nativescript, nativescript-plugin
insomnia
😪 NativeScript plugin to keep the device awake (not dim the screen, lock, etc)
Stars: ✭ 40 (+81.82%)
Mutual labels:  nativescript, nativescript-plugin
JQCollectionViewAlignLayout
A custom layout object based on flow layout. Added supports for horizontal, vertical alignment and RTL direction of collection view items.(available for both UICollectionView and NSCollectionView)
Stars: ✭ 69 (+213.64%)
Mutual labels:  right-to-left, left-to-right
nativescript-app-shortcuts
👇 Home Icon Actions for your NativeScript app, now also for Android!
Stars: ✭ 45 (+104.55%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-drawingpad
📝 NativeScript plugin to provide a way to capture any drawing (signatures are a common use case) from the device
Stars: ✭ 89 (+304.55%)
Mutual labels:  nativescript, nativescript-plugin
texttospeech
Text to Speech NativeScript plugin for Android & iOS 📢
Stars: ✭ 44 (+100%)
Mutual labels:  nativescript, nativescript-plugin
Nozha-rtl-Dashboard
Nozha is a rtl / ltr Admin Panel with Dark Mode
Stars: ✭ 31 (+40.91%)
Mutual labels:  ltr, rtl
nativescript-image-filters
NativeScript plugin to apply filters to images
Stars: ✭ 30 (+36.36%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-app-icon-changer
Change the homescreen icon of your NativeScript iOS app at runtime!
Stars: ✭ 16 (-27.27%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-ng-shadow
Angular directive to apply shadows to native elements according to the elevation level guidelines of material design specification
Stars: ✭ 54 (+145.45%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-vue-examples
🍈 NativeScript and Vue code samples.
Stars: ✭ 13 (-40.91%)
Mutual labels:  nativescript, nativescript-plugin
core
🔥 Antares Core Implemenation. Most important project layer, this is the heart for your app. ACL, notifiter, console, geoip, areas, utils and many more...
Stars: ✭ 24 (+9.09%)
Mutual labels:  support, core
nativescript-store-update
No description or website provided.
Stars: ✭ 18 (-18.18%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-star-printer
🌟 Print directly to Star Micronics printers from your NativeScript app! http://www.starmicronics.com/
Stars: ✭ 28 (+27.27%)
Mutual labels:  nativescript, nativescript-plugin
nativescript-appversion
🔢 NativeScript plugin to retrieve your app's package ID and current version
Stars: ✭ 47 (+113.64%)
Mutual labels:  nativescript, nativescript-plugin

@nativescript-rtl/ui

Add right-to-left UI support to NativeScript framework

Installation

to install plugin write:

NativeScript 7 and higher

tns plugin add @nativescript-rtl/ui

Support NativeScript older then version 7

tns plugin add @nativescript-rtl/[email protected]

Preview

LTR Layout RTL
screenshot 1 AbsoluteLayout screenshot 1
screenshot 2 DockLayout screenshot 2
screenshot 3 GridLayout screenshot 3
screenshot 4 StackLayout screenshot 4
screenshot 5 WrapLayout screenshot 5

Properties

Name Default Description
isRtl true isRtl use to change layout direction by default is true that mean layout from right to left but you can change it to false that change layout direction from left to right

CSS Properties

Name Default Description
direction rtl use to change layout direction by default is rtl that mean layout from right to left but you can change it to ltr that change layout to direction from left to right

How to use

declare plugin in XML then use it.

<Page xmlns="http://schemas.nativescript.org/tns.xsd" xmlns:rtl="@nativescript-rtl/ui">
  <rtl:WrapLayout orientation="horizontal" width="210" height="210" backgroundColor="lightgray">
    <Label text="Label 1" width="70" height="70" backgroundColor="red"/>
    <Label text="Label 2" width="70" height="70" backgroundColor="green"/>
    <Label text="Label 3" width="70" height="70" backgroundColor="blue"/>
    <Label text="Label 4" width="70" height="70" backgroundColor="yellow"/>
  </rtl:WrapLayout>
</Page>

For Angular/Vue 'registerElement` must be used to register each RTL element

example: register elements in app.module.ts

import { registerElement } from "nativescript-angular/element-registry";
registerElement(
  "RGridLayout",
  () => require("@nativescript-rtl/ui").GridLayout
);
registerElement(
  "RWrapLayout",
  () => require("@nativescript-rtl/ui").WrapLayout
);
registerElement(
  "RAbsoluteLayout",
  () => require("@nativescript-rtl/ui").AbsoluteLayout
);
registerElement(
  "RDockLayout",
  () => require("@nativescript-rtl/ui").DockLayout
);
registerElement(
  "RStackLayout",
  () => require("@nativescript-rtl/ui").StackLayout
);

now you can use RGridLayout, RWrapLayout, RAbsoluteLayout, RDockLayout and RStackLayout in your angular project

example:

  <RWrapLayout orientation="horizontal" width="210" height="210" backgroundColor="lightgray">
    <Label text="Label 1" width="70" height="70" backgroundColor="red"></Label>
    <Label text="Label 2" width="70" height="70" backgroundColor="green"></Label>
    <Label text="Label 3" width="70" height="70" backgroundColor="blue"></Label>
    <Label text="Label 4" width="70" height="70" backgroundColor="yellow"></Label>
  </RWrapLayout>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].