You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 17, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: ui/theme.md
+28-31Lines changed: 28 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -463,54 +463,51 @@ You can use the following form-related class names to improve the look of forms
463
463
</StackLayout>
464
464
```
465
465
466
-
* `input-field`: A class name that should be applied to each individual field within aform.
467
-
468
-
``` XML
469
-
<StackLayout class="form">
470
-
<StackLayout class="input-field">
471
-
<!-- The first field, for example “Email address” -->
472
-
</StackLayout>
473
-
<StackLayout class="input-field">
474
-
<!-- The second field, for example “Password” -->
475
-
</StackLayout>
476
-
</StackLayout>
477
-
```
466
+
There are a few different ways you may want to display individual form fields within your form. Look over the list of class names below, and then review the subsequent examples to see those class names in action.
478
467
479
468
* `input`: A class name that applies the base stying to TextField UI components.
480
469
* `input-border`: A class name that adds a border to a TextField UI component.
481
470
* `input-rounded`: A class name that adds a rounded border to a TextField UI component.
471
+
* `label`: A class name that applies the base styling to Label UI components.
472
+
* `input-field`: A class name that can be applied to a parent container to align labels with their corresponding TextField UI controls.
473
+
* `input-sides`: A class name that helps align alabel and text field side by side.
474
+
475
+
Here’saform with a number of different form control display options you can experiment with.
482
476
483
477
``` XML
484
478
<StackLayout class="form">
479
+
480
+
<!-- Option 1: An input with no label, and a bottom border -->
485
481
<StackLayout class="input-field">
486
-
<TextField class="input"></TextField>
487
-
</StackLayout>
488
-
<StackLayout class="input-field">
489
-
<TextField class="inputinput-border"></TextField>
482
+
<TextField hint="Option 1" class="input" />
483
+
<StackLayout class="hr-light"></StackLayout>
490
484
</StackLayout>
485
+
486
+
<!-- Option 2: An input with alabel on top, and a bottom border -->
>**TIP** The NativeScript core theme handles styling disabled TextField components. To disable a TextField, set its `isEnabled` attribute to `false`. For example, `<TextField class="input" isEnabled="false"></TextField>`.
493
+
<!-- Option 3: An label and input—positioned side by side -->
>**TIP** The NativeScript core theme handles styling disabled TextField components. To disable a TextField, set its `isEnabled` attribute to `false`. For example, `<TextField class="input" isEnabled="false"></TextField>`.
510
+
514
511
### Images
515
512
516
513
The NativeScript core theme provides a few CSS class names for altering the appearance of images.
0 commit comments