@nativescript-community/ui-material-textview
| Install | |
|---|---|
npm install @nativescript-community/ui-material-textview |
|
| Latest Version: | 7.3.4 |
| License: | Apache-2.0 |
| Last Updated: | Oct 12, 2026 |
| Links: | GitHub · npm |
NativeScript Material Text view
Material Design's Text view component for NativeScript.
Contents
Installation
For NativeScript 7.0+
tns plugin add @nativescript-community/ui-material-textview
For NativeScript 6.x
tns plugin add nativescript-material-textview
If using tns-core-modules
tns plugin add nativescript-material-textview@2.5.4
Be sure to run a new build after adding plugins to avoid any issues.
Changelog
FAQ
Usage
Plain NativeScript
IMPORTANT: Make sure you include xmlns:mdt="@nativescript-community/ui-material-textview" on the Page element.
XML
<Page xmlns:mdt="@nativescript-community/ui-material-textview">
<StackLayout horizontalAlignment="center">
<mdt:TextView text="raised textview"/>
<mdt:TextView variant="flat" text="flat textview"/>
<mdt:TextView variant="text" text="text textview"/>
<mdt:TextView elevation="5" rippleColor="red" text="raised custom textview"/>
</StackLayout>
</Page>
CSS
mdtextview {
ripple-color: blue;
elevation: 4;
stroke-color: blue; /* the border color when active */
stroke-inactive-color: green; /* the border color when inactive */
floating-color: blue; /* the floating placeholder color when active */
floating-inactive-color: green; /* the floating placeholder color when inactive */
}
NativeScript + Angular
import { NativeScriptMaterialTextViewModule } from "@nativescript-community/ui-material-textview/angular";
@NgModule({
imports: [
NativeScriptMaterialTextViewModule,
...
],
...
})
<MDTextView helper="example helper" placeholderColor="green" keyboardType="datetime"
hint="i am an hint" returnKeyType="next" (focus)="onFocus($event)" (blur)="onBlur($event)"
(textChange)="onTextChange($event)"></MDTextView>
NativeScript + Vue
import TextViewPlugin from '@nativescript-community/ui-material-textview/vue';
Vue.use(TextViewPlugin);
<MDTextView helper="example helper" placeholderColor="green" keyboardType="datetime"
hint="i am an hint" returnKeyType="next" @focus="onFocus" @blur="onBlur"
@textChange="onTextChange"/>
Also, you can bind the text to some instance data using the v-model directive:
<MDTextView v-model="value" />
API
Attributes
Inherite from NativeScript TextView so it already has all the same attributes.
- variant optional
An attribute to set the variant of the textview. Can be outline or underline or filled. No value means underline textview
- errorColor optional
An attribute to set the error color of the textview.
- helper optional
An attribute to set the helper text of the textview.
- floating optional
A boolean attribute to set the floating state of the textview.
Related Packages
Material Design Tabs organize content across different screens, data sets, and o...
The Material Design Ripple component provides a radial action in the form of a v...
Material Design Bottom Sheets slide up from the bottom of the screen to reveal m...
Material Design Activity Indicator expresses an unspecified wait time.
Material Design Dialogs inform users about a task and can contain critical infor...
Version History
| Version | Released | License |
|---|---|---|
| 7.3.4 | Apache-2.0 | |
| 7.3.3 | Apache-2.0 | |
| 7.3.2 | Apache-2.0 | |
| 7.3.1 | Apache-2.0 | |
| 7.3.0 | Apache-2.0 | |
| 7.2.80 | Apache-2.0 | |
| 7.2.79 | Apache-2.0 | |
| 7.2.78 | Apache-2.0 | |
| 7.2.77 | Apache-2.0 | |
| 7.2.71 | Apache-2.0 | |
| 7.2.70 | Apache-2.0 | |
| 7.2.69 | Apache-2.0 | |
| 7.2.68 | Apache-2.0 | |
| 7.2.67 | Apache-2.0 | |
| 7.2.66 | Apache-2.0 | |
| 7.2.65 | Apache-2.0 | |
| 7.2.64 | Apache-2.0 | |
| 7.2.63 | Apache-2.0 | |
| 7.2.62 | Apache-2.0 | |
| 7.2.61 | Apache-2.0 | |
| 7.2.60 | Apache-2.0 | |
| 7.2.59 | Apache-2.0 | |
| 7.2.58 | Apache-2.0 | |
| 7.2.57 | Apache-2.0 | |
| 7.2.55 | Apache-2.0 | |
| 7.2.54 | Apache-2.0 | |
| 7.2.53 | Apache-2.0 | |
| 7.2.52 | Apache-2.0 | |
| 7.2.50 | Apache-2.0 | |
| 7.2.49 | Apache-2.0 |
Showing the latest 30 of 259. See every release on npm
Pre-releases (4)
| Version | Released | License |
|---|---|---|
| 6.2.14-alpha.1 | Apache-2.0 | |
| 6.2.14-alpha.0 | Apache-2.0 | |
| 5.4.0-alpha.4 | Apache-2.0 | |
| 5.3.4-alpha.0 | Apache-2.0 |