Text input
A fundamental element that allows user to enter and modify data
Text input
Type
- Text field. (emails, name, password).
- Number field with leading dropdown. (phone number).
- Text field with leading uneditable text. (URL).
- Text field with trailing button. (Copy text).
- Tags field. (category, topic, type, filter).
Size
Each size is designed to cater to different form needs, ensuring optimal readability and user experience.
State
Text fields can exist in several states, each providing visual cues to the user about its current status and interaction possibilities.
- Default: The initial state of the textfield when it is ready for user input but not currently interacted with.
- Filled: Occurs when a user has entered data into the textfield, indicating that the field contains input.
- Focused: The user clicks on or tabs into the textfield, indicating that it is active and ready to receive input.
- Disabled: The textfield is not available for user interaction, either due to current context or user permissions.
Error state
Error state is triggered when the user clicks on or tabs into a textfield that has an existing error condition.
- The textfield has a red border or shadow to indicate an error.
- Textfield with error remains highlighted when focused.
- Only the field with editable text will have its border highlighted, not the fixed text. Textfield remains highlighted when focused.
Leading & Trailing icon
- Leading icon: Placed on the left side, before the input text. It helps users quickly understand the type of input expected or the context of the field. (eg: Email).
- Trailing icon: Placed on the right side, after the input text. It often serves as an actionable button, providing additional functionality related to the input.
- Clear - cross icon
- Password visibility - eye icon
- Question mark - tooltip icon
Text input group
Input groups are sets of related form elements, including a textfield, hint message, and field label, that work together to guide users and improve data entry.
Type
- Field label: Provides a clear, concise description of the input's purpose.
- Input field: The primary area where users enter their data. It can be a textfield for single-line input or a textarea for multi-line input.
- Hint text provides additional guidance or feedback.
- Helper: Offers instructions or examples to assist users in entering the correct data.
- Error: Displays error messages when the input does not meet validation criteria, helping users correct their entries.
Size
Each size is designed to cater to different form needs, ensuring optimal readability and user experience.
State
Textfields can exist in several states, each providing visual cues to the user about its current status and interaction possibilities.
- Default: The initial state of the textfield when it is ready for user input but not currently interacted with.
- Filled: Occurs when a user has entered data into the textfield, indicating that the field contains input.
- Focused: The user clicks on or tabs into the textfield, indicating that it is active and ready to receive input.
- Disabled: The textfield is not available for user interaction, either due to current context or user permissions.
- Error: Error state is triggered when the user clicks on or tabs into a textfield that has an existing error condition.
Hint text
- Default hint text
- Error hint text
Hint order
- Hint text ABOVE textfield
- Hint text BELOW textfield
WYSIWYG editor
A WYSIWYG (What You See Is What You Get) editor component is a type of web-based tool that allows users to create and edit content in a visual manner, similar to how it will appear in its final form.
Responsive view
Desktop
Show all style icons.
Mobile
By default show basic styling such as Text size, Bold, Italic, Underline and Strike through by default. Hide ordered list, bullet list, links, undo and redo.
- “More” menu to toggle hidden icons.
- Show hidden icons after tap on “More” menu.
- Tap on “More” menu again to hide.
- Text style scrollable dropdown options:
- Paragraph - Regular 15/27
- Heading 1 - Semi Bold 30/38
- Heading 2 - Semi Bold 24/32
- Heading 3 - Semi Bold 20/30
- Heading 4 - Semi Bold 18/26
- Heading 5 - Semi Bold 16/24
- Heading 6 - Semi Bold 14/20
Button type
- Refer Select button state.
- Default: The initial state of the icon when it is ready for user to click on but not currently interacted with.
- Hover/Active: Occurs when a user has hover over the icon, indicating that the icon can be clicked or selected.
- Focused: The user clicks on or tabs into the icon, indicating that it is active and ready for user interaction.
- Disabled: The icon is not available for user interaction, either due to current context or user permissions.
Button state
- Select button type:
default
- Button type:
tertiary
Usage example
Add inline link usage
- Highlight text in richtext editor.
- Click on “Link” icon in editor bar.
- Pop-up appear relative to highlighted text location with text input to enter URL.
- Click “Check” icon to add link to highlighted text.
- Click “Cancel” icon to cancel action and close the pop-up.
- Pop-up tail position at horizontal center of the highlighted text.
- Button hover state
- Change text to blue underlined.
Edit inline link usage
- Click on blue underlined link in rich editor.
- Pop-up appear relative to highlighted text location. Display link previously added. Link text max-width=300px.
- Click “Edit” icon to edit the link to switch to edit mode. (Same UI as “Add inline link”).
- Click “Unlink” icon to remove link to the text. Also reset text style (1).