Input Controls
(Created page with "==== Helper Text ==== Helper text conveys additional guidance about the input control, such as how it will be used. Helper text will only take up a single line below the inpu...")
 
(Adding page to Category:TOC because it contains a TOC.)
 
(4 intermediate revisions by 2 users not shown)
Line 2: Line 2:
Helper text conveys additional guidance about the input control, such as how it will be used. Helper text will only take up a single line below the input control and will be persistently visible.
Helper text conveys additional guidance about the input control, such as how it will be used. Helper text will only take up a single line below the input control and will be persistently visible.


To add Helper text to input control, create '''<ViewModelColumn>_HelperText''' column in the ViewModel editor, where <ViewModelColumn> is the name of the column with input.[[File:Input control with helper text.png|none|thumb|420x420px|Input control with helper text|link=https://wiki.mdriven.net/index.php/File:Input_control_with_helper_text.png]]
To add Helper text to input control, create '''<ViewModelColumn>_HelperText''' column in the ViewModel Editor, where <ViewModelColumn> is the name of the column with input.[[File:Input control with helper text.png|none|thumb|420x420px|Input control with helper text|link=https://wiki.mdriven.net/index.php/File:Input_control_with_helper_text.png]]
====Placeholder====
====Placeholder====
Placeholder text appears in the input control when it has no value set. Placeholder can be a tip for users on how to fill up this input control.
Placeholder text appears in the input control when it has no value set. Placeholder can be a tip for users on how to fill up this input control.
Line 10: Line 10:
Please check out [[Databound Placeholder text]] for more information.
Please check out [[Databound Placeholder text]] for more information.
====Text Types====
====Text Types====
For inputs intended as type text, this type can be overridden with something else. Use the tagged value texttype on the column in the ViewModel.
For inputs intended as type text, this type can be overridden with something else. Use the tagged value text type on the column in the ViewModel.
*Password
*Password
*Email
*Email
Line 19: Line 19:


For further reference, look at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
For further reference, look at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password
====Inputs with Icon====
====Inputs with Icons====
You can add an icon to the input control to improve the visual presentation or give users the visual indicator of which type of input control it is.
You can add an icon to the input control to improve the visual presentation or give users the visual indicator of which type of input control it is.


To add an icon to the input control, set TaggedValue "Icon" on ViewModelColumn. The value of TaggedValue should be the icon name (MDriven Turnkey uses Material Icons – you can find these icon names on the [https://fonts.google.com/icons Google fonts website]).
To add an icon to the input control, set TaggedValue "Icon" on ViewModelColumn. The value of the TaggedValue should be the icon name (MDriven Turnkey uses Material Icons – you can find these icon names on the [https://fonts.google.com/icons Google fonts website]).


It is possible to choose an icon position in the input control. By default, the icon will be placed at the start of the input control (leading icon). You can change this position by setting TaggedValue "IconPosition" to "after'.[[File:Input control with leading icon.png|none|thumb|460x460px|Input control with leading icon|link=https://wiki.mdriven.net/index.php/File:Input_control_with_leading_icon.png]][[File:Input control with trailing icon.png|none|thumb|459x459px|Input control with trailing icon|link=https://wiki.mdriven.net/index.php/File:Input_control_with_trailing_icon.png]][[File:Input control with leading icon and placeholder.png|none|thumb|460x460px|Input control with leading icon and placeholder|link=https://wiki.mdriven.net/index.php/File:Input_control_with_leading_icon_and_placeholder.png]]
It is possible to choose an icon position in the input control. By default, the icon will be placed at the start of the input control (leading icon). You can change this position by setting TaggedValue "IconPosition" to "after".[[File:Input control with leading icon.png|none|thumb|460x460px|Input control with leading icon|link=https://wiki.mdriven.net/index.php/File:Input_control_with_leading_icon.png]][[File:Input control with trailing icon.png|none|thumb|459x459px|Input control with trailing icon|link=https://wiki.mdriven.net/index.php/File:Input_control_with_trailing_icon.png]][[File:Input control with leading icon and placeholder.png|none|thumb|460x460px|Input control with leading icon and placeholder|link=https://wiki.mdriven.net/index.php/File:Input_control_with_leading_icon_and_placeholder.png]]
{{Edited|July|12|2024}}
[[Category:View Model]]
 
[[Category:TOC]]

Latest revision as of 13:47, 26 March 2024

Helper Text

Helper text conveys additional guidance about the input control, such as how it will be used. Helper text will only take up a single line below the input control and will be persistently visible.

To add Helper text to input control, create <ViewModelColumn>_HelperText column in the ViewModel Editor, where <ViewModelColumn> is the name of the column with input.

Input control with helper text

Placeholder

Placeholder text appears in the input control when it has no value set. Placeholder can be a tip for users on how to fill up this input control.

To add Placeholder to input control, create <ViewModelColumn>_Placeholder column in the ViewModel editor, where <ViewModelColumn> is the name of the column with input.

Input control with placeholder

Input controls are rendered differently depending on the value type.

Please check out Databound Placeholder text for more information.

Text Types

For inputs intended as type text, this type can be overridden with something else. Use the tagged value text type on the column in the ViewModel.

  • Password
  • Email
  • Tel
  • URL
  • Search

The type of browser used determines how these input types are rendered.

For further reference, look at https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/password

Inputs with Icons

You can add an icon to the input control to improve the visual presentation or give users the visual indicator of which type of input control it is.

To add an icon to the input control, set TaggedValue "Icon" on ViewModelColumn. The value of the TaggedValue should be the icon name (MDriven Turnkey uses Material Icons – you can find these icon names on the Google fonts website).

It is possible to choose an icon position in the input control. By default, the icon will be placed at the start of the input control (leading icon). You can change this position by setting TaggedValue "IconPosition" to "after".

Input control with leading icon
Input control with trailing icon
Input control with leading icon and placeholder
This page was edited 54 days ago on 03/26/2024. What links here