NativeScript components with the same API on every platform, each using the platform's own design system:
- Android: Material 3 (Material Components)
- iOS: native UIKit, with Liquid Glass on iOS 26+ and fallbacks before, following the Apple Human Interface Guidelines
Features that only exist in one design system (ripple, elevation, shape, floating labels...) are Android only properties and are ignored on iOS.
Each package is independent: install only what you use.
npm install @nativescript-community/ui-button # any package of the listThe components use Material 3. Your Android theme must inherit from a Theme.Material3 theme: in App_Resources/Android/src/main/res/values/styles.xml replace Theme.AppCompat / Theme.MaterialComponents with Theme.Material3.DayNight.NoActionBar (see demo-svelte).
The Material Components version is 1.14.0 by default (Material 3 Expressive: wavy progress, retreat animation...), set the androidXMaterial gradle property to change it.
Material 1.14 requires minSdkVersion 23. For the Expressive look use Theme.Material3Expressive.DayNight.NoActionBar (the plain Theme.Material3 themes work too).
Nothing to install: the components use UIKit. No CocoaPods.
With proguard on Android you must keep the resources of the plugins: add tools:keep="@layout/ns_*" as explained here.
The components are regular NativeScript views: use them in XML, in code or in your framework.
<Button text="Save" variant="contained" />Register the elements you use, once, at startup (registerNativeViewElement comes from @nativescript-community/svelte-native/dom):
import { Button } from '@nativescript-community/ui-button';
import { Switch } from '@nativescript-community/ui-switch';
registerNativeViewElement('uibutton', () => Button);
registerNativeViewElement('uiswitch', () => Switch);@nativescript-community/text is optional. When it is installed the spans (formattedText, formattedHint...) of the components use it, else the spans of NativeScript core.
demo-svelte (with the pages of demo-snippets/svelte) shows every component:
yarn install
yarn build # builds every package
yarn demo.svelte.android # or yarn demo.svelte.ios- sources are in
src/ui-*, the packages inpackages/ui-*are their build output - each package has
index.android.ts,index.ios.ts,index.d.tsandindex-common.ts ui-coreandui-core-tabsmust be built first (yarn buildtakes care of the order)- see NATIVE_COMPONENTS_PLAN.md for the design decisions and the status
Issues and pull requests are welcome on https://github.com/nativescript-community/ui-native-components.
Apache-2.0