Thunkable #6 - Text Input and Label of User Interface full and simple explanation with use
Hello friends, Welcome to the another tutorial of Thunkable, in which we will know about Text Input and Label of UI (User Interface) Category.
Introduction
- Text Input - The Text input, as the name suggests, is the input available to the user of the app, where user can enter some value, which can be text, number, phone number, email address etc.
- Label - The Label is somehow as the Text Input, but the only difference is that, In Text Input, the user can input their own value, whereas label shows a predefined text to the user.
How to add
We can simple drag and drop it to the screen, as shown in the below image.
Note : We add button here to show the text input value after clicking on it. We will show the value in the label.
You can read more about buttons here.
Properties
Text Input
- you can change the name of the input text, by clicking on the rename icon. (The name is just the unique identifier, which is used by android or ios to know info about the text input).
- Hint - The value you enter here, will be shown to the user, if the text input is empty. It is the placeholder value. for e.g. for a text input, which requires user to enter their number, will have this value, "enter your number".
- Text - This value is shown to the user by default. It is different from "Hint", because, it is editable, whereas "Hint" will shown to the user all the time, when the text input is empty.
- KeyBoard Type - This sets the input type of the text input i.e. the input type (number, email, text etc.) which can be accepted by the text input. It has 4 values to choose from,
- default - It will accept all values, and show the default keyboard.
- email address - It will accept only email addresses, and show the keyboard related to email, i.e. show "@" on the keyboard, and for some smartphones, ".com" also.
- numeric - It will accept only numbers, and show a numbered only keyboard.
- phone pad - It will accept only phone numbers, and show the numbered keyboard.
- Height - It sets the height of the text input. It has 3 values to choose from,
- Fit contents, Fill container - Fit contents will sets the height to only occupy the inner text, whereas, Fill container will occupy all the height available on the screen.
- Relative Size - It accepts its value in percentage, that is related to the screen size. If we set its value to 50%, it will set its height to half of the screen, and if 100%, it will occupy whole the available screen.
- Absolute size - It sets the height in pixels.
- Width - It sets the width of the text input. It's value is same as the height, the only difference is that instead of setting height, it sets the width.
- Visible - It sets the visibility. If selected, the text input will be visible to the user, otherwise not.
- Margin - It sets the margin of the text input i.e spacing between the text input border and the screen border or the neighboring element.
margin left sets the margin between screen border and text input border,
margin bottom sets the margin between text input border and button border.
- top - sets the spacing between the top border of text input and top border of the screen or bottom border of the neighboring element.
- bottom - sets the spacing between the bottom border of text input and border border of the screen or top border of the neighboring element.
- left - sets the spacing between the left border of text input and left border of the screen or right border of the neighboring element.
- right - sets the spacing between the right border of text input and right border of the screen or left border of the neighboring element.
- padding - It sets the padding of the text input i.e. spacing between the inner text and the border of the text input.
padding top sets the spacing between the inner text and top border,
padding left sets the spacing between inner text and left border.
- top - sets the spacing between the inner text and the top border.
- bottom - sets the spacing between the inner text and the bottom border.
- left - sets the spacing between the inner text and the left border.
- right - sets the spacing between the inner text and the left border. you can see it when the text input is fully filled.
- Border - It sets the border of the text input. It has 4 properties to customize.
- width - sets the height of the border.
- color - sets the color of the border. you can select any value from the dialog.
- style - sets the style of the border. solid means the border will be a solid line, dotted means the border will be a dotted line and dashed means the border will be a dashed line.
- border radius - sets the border radius i.e curve of the border. you can experiment with various values to see the output. for a pure curve, you can use 20 as it's value.
Label
- Text - The text which is shown to user by default.
- Font Size - It sets the font size of the Label.
- Number Of Lines - It sets the number of lines, that is visible to the user. It shows ellipsis when the text to be shown is more than the specified line.
- Color - It sets the color of Label's text.
- BackgroundColor - It sets the background color of the Label.
- Font Style - It sets the font style of the Label's text either italic or normal.
- Font Weight - It sets, how much the text of label will be thin or thick. you can experiment around different values from the list to find out the value that suits your app. The normal means the font is shown as default, whereas the bold means that the font will be shown thick.
- Text Align - It sets the text alignment of the Label's text.
- left - The text will be align to left.
- right - The text will be align to right.
- center - The text will be align to center.
- justify - Every line of the label stretches to available width.
- Height - It sets the height of the label. The available options works same as of text input described above.
- Width - It sets the width of the label. The available options works same as of text input described above.
- Visible - If turned on, show the label, otherwise, hide it.
- Margin - It sets the margin of the label. The available options works same as of text input described above.
- Padding - It sets the padding of the label. The available options works same as of text input described above.
- Border - It sets the border of the label. The available options works same as of text input described above.
Blocks
Text Input- from "Text input" set "Hint" to - It sets the value specified here as the hint of Text Input.
- from "Text input" set "Text" to - It sets the value specified here as the default text shown to the user. It is different from hint, as the text can be edited but the hint can't i.e. hint will always be visible, when the text input is empty.
- from "Text input" get "Hint" - It returns the value specified as Hint of the Text Input.
- from "Text input" get "Text" - It returns the value present in the Text Input. for e.g. If we had written "something" inside the text input, this will return "something" as it's value.
- from "Text input" set "KeyboardType" to - It sets the keyboard type, which should be shown to the user. i.e. The input type accepted by the Text input, among number, email, phone number and default.
- from "Text input" get "KeyboardType" - It returns the current keyboard type.
- from "Text input" set "Height" to - It sets the height of the Text input in percent relative to available screen size.
- from "Text input" set "Width" to - It sets the width of the Text input in percent relative to available screen size.
- from "Text input" get "Height" - It returns the current height of the Text input.
- from "Text input" get "Width" - It returns the current width of the Text input.
- The computed width and height properties returns absolute height, if you had sets the height relatively in percent or either of fill container and fit contents.
- from "Text input" set "Visible" to - It sets the visibility of the Text input. If sets true, the Text input will be visible otherwise not.
- from "Text input" get "Visible" - It returns true, if Text input is visible to the user, otherwise false.
- from "Text input" set "Border Width" to - It sets the height of border of Text input.
- from "Text input" get "Border Width" - It returns the current height of the Text input's border.
Label
- from "Label" set "Text" to - It sets the text of Label.
- from "Label" get "Text" - It returns the current text of Label.
- from "Label" set "Font Size" to - It sets the size of Label's Text. It sets the font size in pixels.
- from "Label" get "Font Size" - It returns the current font size of the Label.
- from "Label" set "Number of Lines" to - It sets the number of line to be visible. If text is more than the number of lines specified, then it is hidden from the user, with (...) at the end.
- from "Label" get "Number of lines" - It returns the current value of "number of lines" property.
- from "Label" set "Color" to - It sets the color of Label's text.
- from "Label" get "Color" - It returns the current color of Label's text.
- from "Label" set "BackgroundColor" to - It sets the background color of Label.
- from "Label" get "BackgroundColor" - It returns the current background color of Label.
- from "Label" set "FontStyle" to - It sets the font style of Label, either italic or normal.
- from "Label" get "FontStyle" - It returns the current font style.
- from "Label" set "FontWeight" to - It sets, how much the text of Label will be thin or thick. you can experiment around different values. The value between 100 and 500 is below the normal, and above it starts making the text bold.
- from "Label" get "FontWeight" - It returns the current font weight.
- from "Label" set "TextAlign" to - It sets the text align of the Label.
- from "Label" get "TextAlign" - It returns the current text align of Label.
- from "Label" set "Height" to - It sets the height of Label.
- from "Label" get "Height" - It returns the current height of Label.
- from "Label" set "Width" to - It sets the width of Label.
- from "Label" get "Width" - It returns the current width of Label.
- The computed width and height properties returns absolute height, if you had sets the height relatively in percent or either of fill container and fit contents.
- from "Label" set "Visible" to - It sets the visibility of Label. If sets true, the Label will be visible otherwise hidden.
- from "Label" get "Visible" - It returns true, if Label is visible, otherwise false.
Comments
Post a Comment