Text Field

Text fields let users enter information on a form.

Types

Default

Ideal for brief inputs such as names, email addresses, or usernames. These fields accommodate a single line of content, ensuring clarity and ease of use in forms where short, concise information is required.

Multi-line

Designed for longer content like home addresses or additional notes. These fields expand over multiple lines, providing ample space for detailed input without compromising readability.

Sizes

In general, we have 3 text fields sizes. Just like other elements in our library, we follow a standard size of t-shirt clothing sizes to illustrate those different sizes.

sm
md
lg

States

Text fields in Leverage adapt to six distinct states to effectively communicate their status and guide user interactions. Each of these states is designed to improve usability and accessibility, ensuring that users receive clear, consistent guidance when interacting with text fields. Each of these states have their own filled state to show typed value after user finish entering information onto each text fields.

Default

The baseline state when the text field is idle and awaiting input.

Focused

This state is activated when the user selects the text field, including accommodations for screen reader users. It highlights the field to indicate readiness for input.

Hover

Applicable only to devices with cursor pointers, the hover state provides visual feedback when the user places their cursor over the text field.

Pressed

This state is triggered during active interaction (e.g., mouse click or tap) to give immediate feedback as the field is engaged.

Read Only

In this mode, the text field displays content without allowing edits. It can also serve as a form of a disabled state to convey that changes are not permitted.

Error

This state appears when the input fails to meet validation criteria, alerting the user with visual cues (such as a color change or border indication) that the entered data is incorrect or incomplete.

Content

Guide for Labels, Placeholders, Helper Texts, and Error Texts.

Label copy should be concise—no more than three words—and must consist solely of a noun that accurately describes the information the user needs to enter. This approach ensures clarity and avoids using verbs, which could potentially confuse the purpose of the field.

Placeholders, on the other hand, are meant to guide the user on how to fill in the respective field. They provide contextual hints or examples, making it easier for users to understand the expected format or type of information, ultimately streamlining the data entry process.

Helper text provides users with additional context and guidance on how to complete a text field. It is displayed near the input area—typically below it—and can offer examples, formatting instructions, or tips to aid in accurate data entry. The helper text should complement the label and placeholder, be concise, and use plain language. Its purpose is to minimize uncertainty and help users avoid mistakes before they submit their information.

Error text is used to inform users when their input does not meet the required validation criteria. It appears immediately after a user enters invalid data, clearly explaining what went wrong and, where appropriate, how to correct it. To maintain a positive user experience, error messages should be succinct, direct, and written in a constructive tone. They should draw the user's attention—commonly through distinct styling, such as a red color—to ensure that the issue is noticed and promptly addressed.

Both helper and error text should not exceed two lines.

Formatting

ID Card (16 digits)

ID Card numbers are presented every 4 digits separated by a space.

Credit/Debit Card Numbers (16 digits)

Credit/Debit Card numbers are presented every 4 digits separated by a space.

Phone Number

Phone numbers are presented in this format:

  • +(country-code)-XXX-XXXX-XXXX

    example: +62-812-3456-7890

pattern="+([0-9]{3})-[0-9]{3}-[0-9]{4}-[0-9]{4}"

PT Monex Investindo Futures beroperasi berdasarkan izin dan berada di bawah pengawasan BAPPEBTI, merupakan anggota bursa BBJ dan BKDI dan anggota kliring berjangka KBI & Indonesia Clearing House.

PT Monex Investindo Futures beroperasi berdasarkan izin dan berada di bawah pengawasan BAPPEBTI, merupakan anggota bursa BBJ dan BKDI dan anggota kliring berjangka KBI & Indonesia Clearing House.

PT Monex Investindo Futures beroperasi berdasarkan izin dan berada di bawah pengawasan BAPPEBTI, merupakan anggota bursa BBJ dan BKDI dan anggota kliring berjangka KBI & Indonesia Clearing House.

Create a free website with Framer, the website builder loved by startups, designers and agencies.