I have made a simple form in NativeScript but I can't use the core styles!
I would like to use "An input with a simple border and no label" - Option 4 for TextField as described in official documentation at https://docs.nativescript.org/ui/theme.
I copy-paste all code to my project but it looks like CSS is not used at all.
So, I just started NativeScript Playground and copy-paste code from the documentation to the playground to check it and it doesn't work. The code in the playground is. And the form doesn't look like it has to by documentation. It looks like CSS theme doesn't used. What I did wrong? How to use the core theme?
<Page loaded="pageLoaded" xmlns="http://www.nativescript.org/tns.xsd">
<ActionBar title="Home">
</ActionBar>
<ScrollView>
<StackLayout class="home-panel">
<!--Add your page content here-->
<StackLayout class="form">
<!-- Option 1: An input with no label, and a bottom border -->
<StackLayout class="input-field">
<TextField hint="Option 1" class="input" />
<StackLayout class="hr-light"></StackLayout>
</StackLayout>
<!-- Option 2: An input with a label on top, and a bottom border -->
<StackLayout class="input-field">
<Label text="Option 2"
class="label font-weight-bold m-b-5" />
<TextField class="input" />
<StackLayout class="hr-light"></StackLayout>
</StackLayout>
<!-- Option 3: An label and input—positioned side by side -->
<GridLayout class="input-field input-sides" rows="auto, auto"
columns="*,*">
<Label text="Option 3" class="label font-weight-bold"
row="0" col="0" />
<TextField class="input right" row="0" col="1" />
<StackLayout class="hr-light" row="1" colSpan="2">
</StackLayout>
</GridLayout>
<!-- Option 4: An input with a simple border and no label -->
<TextField hint="Option 4" class="input input-border" />
<!-- Option 5: An input with a rounded border and no label -->
<TextField hint="Input rounded"
class="input input-rounded m-t-10" />
</StackLayout>
</StackLayout>
</ScrollView>
</Page>
nativescript-theme-corepackage or the scoped@nativescript/themepackage?nativescript-theme-corewas a beta release, the stable release is under scoped package. You will have import compat suffixed CSS files to use v1.x based class names. - Manoj