Components

Field

A container component for receiving a value from the user, providing consistent label, helper text, error notation, and status feedback.

FigmaReactLynxiOSAndroid
Field cover image

Anatomy

Anatomy image of Field. Consists of three areas: Header, Input, and Footer.

Field consists of three areas: Header, Input, and Footer.

  • The Header includes a Label, a Requirement Mark, and a Sub Action in the Suffix Slot if needed.
  • Input is the area where the actual input UI is placed, such as Text Input, Textarea, and Input Button.
  • The Footer provides supplementary information via Helper Text, Error Message, and Character Count.

Properties

Header Property

Field Header Property - Label Weight, Requirement Mark, Suffix Slot

Label is provided in two weights: Medium and Bold. Write the Label text as a noun phrase without a period, and it is best expressed on a single line. Use up to a maximum of two lines only when necessary.

Whether input is required can be indicated to the right of the Label. Required values are shown with a Requirement Mark, and optional values with Text.

The Suffix Slot is positioned to the right of the Label, providing a supplementary action function via a Ghost Button or Icon.

Input Slot

Field Input Slot - the area where various Input components can be placed

Various Input components that receive the actual value can be placed in the Input Slot.

The Input components provided by Crispy are as follows, and they are provided in combination as Templates.

If a special format or feature such as masking is needed, the format and behavior can be defined directly for use.

Field Footer Property - Helper Text, Error Message, Character Count

Helper Text and Error Message are positioned on the left of the Footer, and Character Count can be shown on the right.

When Error Message and Helper Text exist at the same time, only the Error Message is shown. Write the message concisely, in an instructional form. (e.g. "Please enter a 10-11 digit phone number")

Character Count is shown in the Neutral color when a value exists. Use it only when there is a limit on the input length.

Guidelines

Form structure

Form components - Input, Field, Fieldset, Form

To use the Field component, you must first understand the basic structure of a Form. A Form is a structure for receiving input values from a user, largely composed of four elements.

  • Input: The element responsible for the actual input in the UI.
  • Field: An element that bundles Header, Input, and Footer together.
  • Fieldset: A container that groups multiple Fields into one section.
  • Form: A container that submits and validates the values of input elements such as Input, Field, and Fieldset.

Submit and Validation

A Form goes through a process of validating whether the value entered in the Input is valid and submitting the value.

There are generally two methods of validation, and they can be mixed depending on the situation. For simple validation such as required values or character count checks, use the inline method; for business logic or server rules, apply validation on submit. For fields with a high risk of mis-entry, such as security or financial information, inline validation that provides immediate feedback is recommended.

Validation on Submit

Example of validation on submit

Validation proceeds when the Submit button is clicked. The Submit button can be enabled depending on whether conditions are met, or it can always remain enabled. By default, the full validation-on-submit method is used.

Inline validation

Example of inline validation

Validation proceeds at the Field level. The input value is validated whenever focus leaves the Input element (blur) or the value changes (change/update). Used when there are many fields on a screen and error accumulation needs to be prevented.

Notice on leaving the page

Example of a leave-notice dialog being shown

If the user tries to leave again after entering a write or edit screen, a warning notice that the entered values may be lost must be shown via Alert Dialog or similar.

Example where a leave-notice dialog is unnecessary: when there is no change to the value, when auto-save is used

The notice can be omitted when there is no change to the value or when there is an auto-save feature.

Indicating whether input is required

Indicating required input - example of using a Requirement Mark

Mixed use of Requirement Mark and Text
Don’t
Do not mix Requirement Mark and Text within the same screen.

If 2/3 or more of the fields on a screen are required, show only "Optional" (for the optional ones); otherwise, use only '*'. Do not mix the two notations within a single Form.

Composing a Form on a single screen

Example of composing a Form on a single screen

A UX pattern that can be used when creating or editing an entity. The Form must be composed so as to enter or edit the entity's data. The Create Form and the Update Form should maintain the same composition where possible.

Composing a step-by-step Form

Example of composing a step-by-step Form

A UX pattern that can be used when additional data entry or editing is needed based on the option selected in a previous step. It can also be used when a mobile screen becomes complex with multiple Forms and Inputs.

Depending on the situation or the flow being composed, this can be mixed with a single-screen Form.

Specification

Field

base

StateSlotPropertyValue
enabledrootgap
headerpaddingX
gap
indicatorIconcolor
size
paddingTop
paddingLeft
indicatorTextcolor
fontSize
lineHeight
fontWeight
paddingLeft
footerpaddingX
gap
descriptioncolor
fontWeight
fontSize
lineHeight
descriptionIconpaddingRight
color
size
errorMessagecolor
fontWeight
fontSize
lineHeight
errorIconpaddingRight
color
size
characterCountcolor
fontWeight
fontSize
lineHeight
maxCharacterCountcolor
fontWeight
fontSize
lineHeight
invalidcharacterCountcolor
maxCharacterCountcolor

Field Label

base

StateSlotPropertyValue
enabledrootcolor
fontSize
lineHeight

weight=medium

StateSlotPropertyValue
enabledrootfontWeight

weight=bold

StateSlotPropertyValue
enabledrootfontWeight

Table of contents