Component Guidance - Forms & Inputs
Form controls and input components for data entry.
When to Use This Skill
Use this skill when:
- The user asks "Should I use [component] for [use case]?"
- The user needs to choose between similar components
- The user asks about component best practices
- The user wants to know when NOT to use a component
This skill covers: Checkbox, Combobox Input, Date Picker, Fieldset, File Uploader, Form Grid, Form Group, Form Header, Form Item, Form Label, Form Message, Input, Input Group, Multi ComboBox, Multi Input, Radio, Select, Slider, Step Input, Switch, Textarea, Time, Time Picker, Token, Tokenizer, Upload Collection
Checkbox
Description:
A checkbox lets users set a binary value (true/false). When selected, it toggles between checked (state applies), unchecked (state doesn't apply), and optionally tri-state/indeterminate (mixed selection of dependent fields). All options are visible, and users can make one or more independent selections.
When to use:
- Only one option can be selected or deselected (e.g., accept terms of use) when meaning is obvious
- A group or list of options can be selected independently of each other
- Options are displayed immediately without user interaction
- Intermediate selection state (tri-state) is required when multiple sub-options are grouped under a parent option
When to avoid:
- ❌ User needs to choose multiple options from a large list → Use Combo Box Input instead
- ❌ User can choose only one option from a list → Use Radio Buttons, Select, or List instead
- ❌ User needs to perform instantaneous actions without reviewing or confirming → Use Switch instead
- ❌ Not enough space available on screen → Use Combo Box instead
Best practices:
- ✅ Checked state means the described state applies or item is chosen
- ✅ Unchecked state means the described state doesn't apply
- ✅ Tri-state/indeterminate indicates neither checked nor unchecked (set via JavaScript
indeterminate property)
- ✅ Use tri-state to represent mixed selection when some (but not all) dependent fields are selected
- ✅ All options visible without user interaction
- ⚠️ Tri-state is visual only and cannot be achieved by direct user interaction
- ⚠️ Use for independent selections where multiple options can be selected simultaneously
Combobox Input
Description:
Combobox allows users to select item from predefined list. Provides editable input field for filtering list and dropdown menu with available options. If entries not validated by app, users can enter custom value. Combines input field with dropdown selection.
When to use:
- Select single item from long list of items
- List items are secondary information not needing immediate display
- Need filtering capability for large lists
- Allow custom entry if not validated
- Searchable dropdown needed
- Select from many options (more than select can handle comfortably)
When to avoid:
- ❌ Only two options → Use Switch instead
- ❌ Short list of items → Use Select component instead
- ❌ More than 200 list items → Use input field with select dialog or value help dialog
- ❌ Simple selection without filtering → Use Select
Best practices:
- ✅ Editable input field for filtering list
- ✅ Dropdown menu with available options
- ✅ Use for long lists of items
- ✅ Allow custom value entry if not validated by application
- ✅ List items are secondary - don't need immediate display
- ✅ Single item selection only
- ✅ Provide search/filter functionality
- ✅ Show filtered results as user types
- ⚠️ For 2 options, use Switch
- ⚠️ For short lists, Select is simpler
- ⚠️ For >200 items, use dialog-based selection
- ❌ Don't use for very short lists
Date Picker
Description:
Date Picker lets users select localized date using touch, mouse, or keyboard input. Responsive behavior for all devices - compact mode (smaller) and cozy mode (touch-friendly). Two parts: Input Field (direct entry or picker) and Date Picker (day/month/year/year ranges views).
When to use:
- Users need to enter single date
- Navigate directly from one month or year to another
- Enter lots of data fast or primarily using keyboard
- Single date selection needed
- Responsive date input required
- Direct date entry or picker selection
When to avoid:
- ❌ Combined date and time input → Use Date/Time Picker instead
- ❌ Keep calendar visible and prominent → Use Calendar instead
- ❌ Enter date range → Use Date Range Picker instead
- ❌ Multiple dates selection → Use appropriate multi-date picker
Best practices:
- ✅ Input field for direct date entry or picker selection
- ✅ Date picker shows day view, month view, year view, year ranges
- ✅ Compact mode: smaller size
- ✅ Cozy mode: touch-friendly size
- ✅ Responsive behavior for all devices
- ✅ Use touch, mouse, or keyboard input
- ✅ Navigate directly between months/years
- ✅ Single date selection
- ✅ Localized date format
- ⚠️ For date+time, use Date/Time Picker
- ⚠️ For ranges, use Date Range Picker
- ❌ Don't use for date ranges
Fieldset
Description:
A fieldset gives semantic meaning to a group of elements inside a form (e.g., Billing or Shipping Address). Grouping fields provides styling and accessibility benefits, and is especially important for checkbox groups and radio button groups.
When to use:
- Group related form elements semantically (e.g., Billing Address, Shipping Address)
- Group checkbox groups for accessibility
- Group radio button groups for accessibility
- Provide semantic structure to form sections
When to avoid:
- ❌ Grouping unrelated form elements together
- ❌ Using fieldset when simpler grouping methods suffice for non-form content
Best practices:
- ✅ Always use fieldset for checkbox groups (accessibility requirement)
- ✅ Always use fieldset for radio button groups (accessibility requirement)
- ✅ Use
<legend> element to provide a label for the fieldset
- ✅ Provides both styling and accessibility benefits
- ✅ Use for semantic grouping of related form fields
- ⚠️ Checkbox and radio button groups should always be grouped with fieldset
- ⚠️ Essential for screen reader users to understand field relationships
File Uploader
Description:
The file uploader lets users select and upload one or more files using their local file explorer. It's an opinionated composition of input and button components designed for simple upload tasks with automatic upload start upon file selection.
When to use:
- Upload one or more files using local file explorer
- Upload files by dragging and dropping
- Simple upload tasks where file management isn't needed
- Uploading single files (works best for this case)
When to avoid:
- ❌ Uploading large files that may take a long time → Use upload collection instead
- ❌ Users need to see upload status → Use upload collection instead
- ❌ Users need a preview of uploaded files → Use upload collection instead
- ❌ Users may need to rename uploaded files → Use upload collection instead
- ❌ Users need to manage multiple uploads (delete, rearrange, rename files) → Use upload collection instead
Best practices:
- ✅ Best suited for uploading single files
- ✅ Uploading starts automatically when files are selected
- ✅ Supports both file explorer selection and drag-and-drop
- ✅ Includes only input field or button for simplicity
- ⚠️ For multiple file management features, use upload collection component
- ⚠️ Not suitable for large files or when upload status visibility is required
Form Grid
Description:
The form grid provides responsive layouts for forms on a 12-column grid with four breakpoints (Small <600px, Medium 601-1024px, Large 1025-1440px, Extra-large >1441px). It supports configurable label-field ratios (X:Y:Z format) and adapts layouts based on form width, not screen width.
When to use:
- Create responsive form layouts that adapt to different form widths
- Balance form layout between labels, fields, and empty columns
- Single-column layouts for mobile/dialogs (Small size)
- Two-column layouts for larger screens (Large/Extra-large sizes)
- Split-screen or full-screen form views with specific label-field ratios
- Forms requiring vertical layout (labels above fields) or horizontal layout (labels beside fields)
When to avoid:
- ❌ Simple forms that don't need responsive grid behavior
- ❌ When a simpler form layout component suffices
Best practices:
- ✅ Use single-column layout for small forms (mobile/dialogs) - labels above fields
- ✅ Use two-column layout for large/extra-large forms to avoid scrolling
- ✅ Adapt label-field ratio based on context: 2:10:0 (default medium), 4:7:1 (split-screen), 3:5:4 (full-screen)
- ✅ Use 4:8:0 ratio for long labels/input values at medium width
- ✅ All forms display vertical layout under Small breakpoint automatically
- ✅ Position form groups side-by-side in Z layout for large/extra-large sizes
- ✅ Use recommended column numbers to maximize screen space and avoid unnecessary scrolling
- ⚠️ Breakpoints depend on form width, not screen width
- ⚠️ Empty grid columns (Z in X:Y:Z ratio) prevent excessive input field stretching
- ⚠️ Change default label-field ratio according to your app's specific needs
Form Group
Description:
Form groups assemble form elements with labels, messages, and help containers. Components like fd-form__item with label and control can be used independently when error messages aren't needed.
When to use:
- Assemble complete form elements with labels, controls, messages, and help text
- Group related form fields with validation messages
- Create structured form layouts with consistent spacing
- Need error messages, help text, or validation feedback alongside form fields
When to avoid:
- ❌ Simple form fields that don't need error messages or help text → Use
fd-form__item alone instead
- ❌ When minimal form structure suffices
Best practices:
- ✅ Use full form group when error messages or help containers are needed
- ✅ Use
fd-form__item with label and control alone for simpler fields without messages
- ✅ Components can be used independently based on needs
- ✅ Provides consistent structure for labels, controls, messages, and help text
- ⚠️ Not every form field needs the full form group structure
- ⚠️ Choose minimal necessary components to avoid over-engineering simple forms
Form Header
Description:
Form headers are titles that provide context about a group of input fields. For example, "Personal Information" would categorize fields like Name, Address, etc.
When to use:
- Provide context and categorization for groups of input fields
- Organize form sections with descriptive titles
- Help users understand what information belongs in each form section
- Create visual hierarchy in long or complex forms
When to avoid:
- ❌ Single input field that doesn't need categorization
- ❌ When field labels alone provide sufficient context
Best practices:
- ✅ Use descriptive titles that clearly categorize the grouped fields (e.g., "Personal Information", "Billing Address")
- ✅ Place header before the related group of input fields
- ✅ Use for organizing complex forms into logical sections
- ✅ Helps users scan and navigate long forms efficiently
- ⚠️ Keep header text concise and meaningful
- ⚠️ Don't overuse - only when grouping provides real value
Form Item
Description:
A form item combines a label and an input field. The label clearly describes the expected input and is associated with the input for accessibility.
When to use:
- Combine label and input field as a single form element
- Optional inputs that don't require validation or indication (default)
- Required inputs that need visual and accessible indication (use
fd-form-label--required)
- Ensure accessible association between label and input
When to avoid:
- ❌ Input without a label (fails accessibility requirements)
- ❌ When more complex form structure with messages is needed → Use Form Group instead
Best practices:
- ✅ Use default form item for optional inputs without validation
- ✅ Mark required inputs with
fd-form-label--required modifier class
- ✅ Set
aria-required="true" on required input fields for screen readers
- ✅ Associate label with input using
for attribute and matching id
- ✅ Label clearly describes the expected input
- ⚠️ Always provide accessible labels for form inputs
- ⚠️ Required fields need both visual indicator (modifier) and ARIA attribute
Form Label
Description:
Form labels identify form elements like input fields, checkboxes, and radio buttons. Best used as a child element of Form Item component.
When to use:
- Identify any form element (input field, checkbox, radio button)
- Optional fields without special styling (default)
- Required fields with visual and programmatic indication (
fd-form-label--required)
- Labels that need a colon displayed (
fd-form-label--colon)
- Disabled form elements requiring visual indication
When to avoid:
- ❌ Form elements without labels (fails accessibility)
- ❌ Using label outside of form context
Best practices:
- ✅ Use default form label for optional fields
- ✅ Add
fd-form-label--required modifier for required fields
- ✅ Use
required and aria-required="true" attributes on input for required fields
- ✅ Add
fd-form-label--colon modifier to display label with colon
- ✅ Show disabled state using one of three methods:
aria-disabled="true", is-disabled class, or fd-form-label--disabled modifier
- ✅ Best used as child element of Form Item component
- ⚠️ Disabled labels need both visual (class/modifier) and programmatic (
aria-disabled="true") indication
- ⚠️ Associate label with form element using
for attribute
Form Message
Description:
Form messages display value state text (success, error, warning, information) shown when focus is on the input field. They work with input control value states to provide feedback to users.
When to use:
- Display validation feedback for form inputs
- Show success messages after successful input
- Display error messages for invalid input
- Show warning messages for potential issues
- Provide informational messages about input requirements
- Communicate value state to users when input has focus
When to avoid:
- ❌ Messages unrelated to form validation or input state
- ❌ Critical system messages → Use message strip or alert instead
Best practices:
- ✅ Use
is-success, is-error, is-warning, is-information classes on input element (fd-input)
- ✅ Use matching
fd-form-message--success, --error, --warning, --information modifiers on message element
- ✅ Message appears when focus is on the input field
- ✅ Match input state class with corresponding message modifier
- ✅ Provide clear, actionable feedback in message text
- ⚠️ Four value states available: success, error, warning, information
- ⚠️ Input and message states must match for visual consistency
Input
Description:
Text input fields allow users to enter and edit single-line text, numbers, dates, or times. They should always be paired with a label, and required fields should have an asterisk (*). Features include autocomplete, suggestions, and value help for valid data entry.
When to use:
- Enter short, single-line text or numbers, dates, or times
- Enter password, URL, phone number, or email address
- Select a single item from a large dataset (more than 200 items)
- Find an object by searching multiple attributes (ID, city, customer name) - use with autocomplete and value help
- Select one or more items from a list (multi-input)
- Find items from a list by searching multiple attributes (combobox)
When to avoid:
- ❌ Entering dates and times → Use date picker, date range selection, or date/time picker instead
- ❌ Entering long texts → Use textarea instead
- ❌ Carrying out a search → Use search field instead
- ❌ Selecting multiple values → Use multi-combo box (<200 items) or multi-input field (>200 items) instead
- ❌ Selecting from small set of values (<20 items) → Consider select control instead
Best practices:
- ✅ Always pair input with a label
- ✅ Mark required fields with asterisk (*) in label
- ✅ Use autocomplete and suggestions for better user experience
- ✅ Provide value help for complex data entry
- ✅ For small sets (<20 items), use select control
- ✅ For medium sets (20-200 items), use combo box
- ✅ For large sets (>200 items), use input with value help
- ⚠️ Single-line text only - use textarea for multi-line
- ⚠️ Required fields must have visual indicator (asterisk) in label
Input Group
Description:
Input Group combines form inputs with add-ons (text, icons, or buttons) to help users understand the information being entered. Add-ons can be positioned before, after, or on both sides of the input field. Supports validation states (success, error, warning, information).
When to use:
- Add text add-ons to clarify value format (e.g., currency, units)
- Add icon add-ons as visual cues (visibility toggles, status indicators)
- Add button add-ons for actions (submit, search, trigger)
- Display validation or feedback states visually
- Provide context about expected input format or units
When to avoid:
- ❌ Simple inputs that don't need additional context → Use basic input instead
- ❌ Complex actions that need more than a simple button → Consider separate action buttons
Best practices:
- ✅ Position add-ons logically: before (prefix), after (suffix), or both sides
- ✅ Use text add-ons for units or currency symbols
- ✅ Use icon add-ons for visual cues (e.g., visibility toggle, status)
- ✅ Use button add-ons for actions like submit or search
- ✅ Apply state classes:
.is-success, .is-error, .is-warning, .is-information on .fd-input-group
- ✅ Use
.is-focus class on .fd-input-group for focused state
- ✅ Buttons can contain text or icons
- ⚠️ Add-ons should clarify or enhance input understanding, not clutter
- ⚠️ State modifiers must be applied to the input group container
Multi ComboBox
Description:
Multi ComboBox enables users to select options from predefined list or enter custom text. Provides editable input field to filter list and dropdown arrow to open options. Select options have checkboxes permitting multiple selection. Combines filtering with multi-selection capability.
When to use:
- Select one or more options from long list (no more than ~200)
- Values contain secondary information not needing immediate display
- Multiple selection from filtered list needed
- Editable input for filtering options
- Multi-select with search/filter capability
When to avoid:
- ❌ Select multiple ranges → Use appropriate range selector
- ❌ Select or search multiple business objects → Use specialized selector
- ❌ Short list of items → Use simpler multi-select component
- ❌ Add custom values → Use Multi Input instead
- ❌ List contains >200 items → Use dialog-based selection
Best practices:
- ✅ Editable input field to filter list
- ✅ Dropdown arrow to open options list
- ✅ Checkboxes for multiple selection
- ✅ Use for long lists (up to ~200 items)
- ✅ Secondary information in values
- ✅ Filter as user types
- ✅ Show selected items as tokens
- ✅ Allow deselection of items
- ⚠️ Maximum ~200 items
- ⚠️ For custom values, use Multi Input
- ❌ Don't use for short lists
Multi Input
Description:
Multi Input allows users to enter multiple values displayed as tokens. Provides editable input field for filtering list and dropdown menu with available options. If entries not validated, users can enter custom values. Supports value help for selecting/searching multiple business objects and ranges.
When to use:
- Provide value help to select or search multiple business objects
- Let users select multiple ranges (with value help)
- Enable users to add custom values
- Multiple values displayed as tokens
- Editable input for custom entries
- Value help dialog for complex selection
When to avoid:
- ❌ Choose multiple options from large list → Use Multi ComboBox instead
- ❌ Not enough space on screen → Consider alternative
- ❌ Choose only one option → Use single-select component
- ❌ Simple multi-selection without custom values → Use Multi ComboBox
Best practices:
- ✅ Multiple values displayed as tokens
- ✅ Editable input field for filtering
- ✅ Dropdown menu with available options
- ✅ Allow custom value entry if not validated
- ✅ Use value help for multiple business objects
- ✅ Support multiple range selection with value help
- ✅ Show selected values as removable tokens
- ✅ Enable custom value entry
- ✅ Provide value help dialog for complex scenarios
- ⚠️ For predefined-only options, use Multi ComboBox
- ⚠️ Requires adequate screen space
- ❌ Don't use for single selection
Radio
Description:
Radio buttons provide mutually exclusive options, allowing users to select only one option from two or more choices. They only work in groups and are best for selecting from a small set of clearly different alternatives.
When to use:
- Users need to choose only one option from different alternatives
- Users need to see all options at once without interacting with a dropdown
- Small set of options (no more than 8)
- Users need to trigger an immediate change without pressing Submit
- Users need to choose quickly between at least two clearly different choices
When to avoid:
- ❌ Users need to select more than one option → Use checkboxes instead
- ❌ Users need to select items in a list → Use checkboxes or direct tap selection
- ❌ Users are expected to go with the most common option → Use dropdown with default instead
- ❌ Users are choosing between just two options → Use single checkbox or toggle switch instead
- ❌ More than 8 options to present → Use dropdown box or list view instead
- ❌ Options are numbers with fixed steps → Use slider control instead
- ❌ Users need to select a value from a range → Use slider instead
Best practices:
- ✅ Align radio buttons vertically, especially for long labels (easier to read and localize)
- ✅ Use horizontal alignment only for one-word labels (e.g., background color settings)
- ✅ Always align vertically in forms (label length varies across languages)
- ✅ Use group labels and padding to separate multiple radio button groups
- ✅ Default: long labels truncate with ellipsis
- ✅ Use
.fd-radio__label--wrap modifier for labels that wrap to new line (set max-width on label)
- ✅ Use
.fd-radio__label--wrap-top-aligned for top-left aligned wrapping labels
- ⚠️ Radio buttons only work in groups for mutually exclusive options
- ⚠️ Don't put two radio button groups next to each other without clear separation
- ⚠️ Maximum 8 options - use dropdown for more
Select
Description:
Select component (dropdown) lets users pick one item from a small, predefined list. Can be placed in toolbars (chart, footer, header), forms, or tables. List stays hidden until opened.
When to use:
- Choose only one item from short list (typically 2-12 items)
- Users don't need to see all options at once
- Helpful to start with default selection (especially if one option used most often)
- Predefined list instead of free-form text input
- Logically grouped list with common items first, others sorted
- Space-saving alternative to radio buttons
When to avoid:
- ❌ Only two options → Use switch instead
- ❌ Very large set of items → Use combo box instead
- ❌ Display multiple attributes or search on multiple attributes → Use input field with select dialog or value help dialog
- ❌ Need to display all options without interaction → Use radio buttons instead
- ❌ More than 12 options → Consider combo box with search
Best practices:
- ✅ Keep texts concise, avoid complex content
- ✅ Define default selection whenever possible
- ✅ Sort values in meaningful order (common first, then alphabetical/numerical/topical)
- ✅ Use appropriate text for "not selected" option (not blank)
- ✅ Use fixed width (don't auto-adjust based on selection)
- ✅ In two-column layout, place most relevant value in first column
- ✅ Keep selection list items simple and scannable
- ⚠️ Avoid icons in selection list - if used, ensure they match text
- ⚠️ Avoid disabling selection options when possible
- ❌ Don't overload with too many options
- ❌ Don't use blank value for "not selected"
Slider
Description:
Slider allows users to adjust a value along continuous or gradual range. Handles values that change smoothly (volume, brightness). Provides immediate visual feedback. Range Slider variant lets users select min/max value range within predefined interval.
When to use:
- Adjust value along continuous or gradual range
- Handle values that change smoothly (volume, brightness, saturation, contrast)
- Allow quick adjustments without typing
- Provide immediate visual feedback as handle moves
- Select min/max value range (use Range Slider)
- Display and adjust settings visually
When to avoid:
- ❌ Making specific choices (categories, list items) → Use radio buttons or checklists
- ❌ Without full accessibility support → Use dropdown or input field instead
- ❌ Space is limited (small screens) → Use smaller input options
- ❌ Precise numeric input needed → Use number input field
- ❌ Single value selection when Range Slider used → Use standard Slider
Best practices:
- ✅ Always label slider to indicate what selected value represents
- ✅ Keep custom slider labels short and meaningful
- ✅ Use steps that match required precision (smaller steps for exact values)
- ✅ Display unit of measurement (%, kg, °C) next to slider or input field
- ✅ Display current value near slider or in connected input field
- ✅ Choose appropriate size for use case
- ✅ Use stepped increments for predefined intervals
- ✅ Ensure values are clearly labeled for context
- ✅ Show current value as user interacts
- ✅ Ensure keyboard interaction support
- ✅ Provide visible value indicators and clear min/max labels
- ⚠️ Consider screen size - sliders take up space
- ⚠️ Match step size to precision requirements
- ❌ Don't use without accessibility support
Step Input
Description:
Step Input allows users to adjust numeric values in predefined increments (steps) using buttons or direct input. Useful for quantities or measurements without manually typing every number. Supports keyboard and mouse interactions, customizable with min, max, and step values.
When to use:
- Adjust amounts, quantities, or numeric values quickly
- Change values in defined increments (e.g., shopping cart quantities)
- Need increment/decrement buttons for numeric input
- Users benefit from predefined step values
- Quick numeric adjustments needed
When to avoid:
- ❌ Fixed numbers (postal code, phone number, ID) → Use regular input field
- ❌ Values that rarely change or don't follow steps (account number) → Use regular input field
- ❌ Entering dates or times → Use Date Picker, Time Picker, or Date/Time Picker
- ❌ Free-form numeric input without increments → Use number input
Best practices:
- ✅ Provide increment/decrement buttons
- ✅ Allow direct input via keyboard
- ✅ Set appropriate min, max, and step values
- ✅ Support both keyboard and mouse interactions
- ✅ Use for quantities that change in defined steps
- ✅ Display current value clearly
- ✅ Disable buttons at min/max boundaries
- ✅ Use in shopping carts, quantity selectors, measurement adjustments
- ⚠️ Define reasonable step increments for use case
- ⚠️ Set min/max values to prevent invalid entries
- ❌ Don't use for fixed or rarely changing values
Switch
Description:
Switch mimics a physical switch, allowing users to toggle individual features on or off. Mainly used for settings, personalization, and cases where impact is directly recognizable. Changes take immediate effect.
When to use:
- Set something as active or inactive (e.g., dialog, feature toggle)
- Clearly show mode or state of a setting
- Change takes immediate effect without confirmation
- Toggle between two mutually exclusive states (on/off)
- Settings and personalization options
- Binary choices with immediate impact
When to avoid:
- ❌ Additional steps required for changes to take effect → Use Checkbox instead
- ❌ Requires confirmation or Submit button → Use Checkbox instead
- ❌ Unclear if showing state or action → Use Checkbox instead
- ❌ More than two options → Use Radio buttons or Select
- ❌ Part of form requiring submission → Use Checkbox
Best practices:
- ✅ Use for immediate on/off toggles
- ✅ Clearly show current mode or state
- ✅ Use for settings and personalization
- ✅ Ensure impact of toggle is directly recognizable
- ✅ Provide clear labels describing what is being toggled
- ✅ Show visual feedback for on/off states
- ✅ Changes take effect immediately without confirmation
- ⚠️ Don't use if change requires confirmation
- ⚠️ Ensure it's clear whether showing state or action
- ❌ Don't use as part of form requiring Submit
Textarea
Description:
Textarea is an input component that allows users to enter multiple lines of unformatted text. Optionally includes a character counter displayed below the textarea.
When to use:
- Users need to enter multiple lines of text
- Users need to enter unformatted text across several lines
- Display character count (entered or remaining) with counter feature
- Long-form text input without formatting requirements
When to avoid:
- ❌ Users only need to enter a single line of text → Use input component instead
- ❌ Users need to enter formatted text → Use rich text editor instead
Best practices:
- ✅ Use for multi-line unformatted text entry
- ✅ Add counter to display number of characters entered or remaining
- ✅ Counter is displayed below the textarea
- ✅ Provide clear label describing expected content
- ⚠️ For single-line text, use input component instead
- ⚠️ For formatted text needs, use rich text editor
Time
Description:
Time component is used to select a time value. Can choose hours, minutes, seconds, and/or period of day. Rarely used alone - typically paired with Time Picker pattern. Supports time selection, time ranges, and detailed durations.
When to use:
- User needs to select a specific time
- User needs to select time range (start time and end time)
- User needs to select detailed duration (e.g., 1 minute 30 seconds)
- Precise time selection required
- Used within Time Picker pattern
When to avoid:
- ❌ Selecting simple duration (15min, 30min, 1hr, 2hr) → Use Select component instead
- ❌ Selecting date and time together → Use Date Picker (date/time variant) instead
- ❌ Approximate time needed → Consider simpler selection method
- ❌ Only hour selection needed → Use Select with hour options
Best practices:
- ✅ Typically used within Time Picker pattern
- ✅ Can select hours, minutes, seconds, and period (AM/PM)
- ✅ Use for precise time selection
- ✅ Use two time pickers for time ranges (start and end)
- ✅ Support detailed duration selection (minutes and seconds)
- ✅ Provide clear labels for time fields
- ✅ Use 12-hour or 24-hour format based on locale
- ✅ Enable keyboard input for faster entry
- ⚠️ For simple durations, Select is more appropriate
- ⚠️ For date+time, use Date Picker instead
- ❌ Don't use alone - pair with Time Picker pattern
Time Picker
Description:
Time Picker lets users select localized time using touch, mouse, or keyboard in 12/24-hour format. Users can type directly or use visual clock face for hours, minutes, seconds. Contains time input field and time picker popover with clock faces. Supports cozy and compact modes.
When to use:
- Users need to select a time
- Users need to select time range (use two time pickers for start and end)
- Users need to select specific duration (e.g., 1 minute 30 seconds)
- Visual clock face selection is helpful
- Precise time input required
When to avoid:
- ❌ Selecting simple duration (15min, 30min, 1hr) → Use Select instead
- ❌ Selecting date and time together → Use Date Picker (date/time variant)
- ❌ Only approximate time needed → Simpler selection method
Best practices:
- ✅ Time input field for direct entry or button to open popover
- ✅ Time picker popover with clock faces (hours, minutes, optional seconds)
- ✅ Hours clock face shows 12 or 24 hours based on format
- ✅ Optional seconds clock face (omit if not relevant)
- ✅ AM/PM switch using segmented button (12-hour format)
- ✅ Optional "Now" button (transparent icon button)
- ✅ Footer with Bar component and decisive buttons
- ✅ Cozy mode for larger touch targets, compact mode for dense UIs
- ✅ Mobile (size S): popover opens in subview, not below input field
- ✅ Two input methods: direct entry or clock face selection
- ✅ Enable keyboard, mouse, and touch input
- ✅ Use two time pickers for time ranges
- ⚠️ On mobile, time input field opens time input popover with touch keyboard
- ⚠️ Choose format (12/24-hour) based on locale
- ❌ Don't force clock face only - allow direct text entry
Token
Description:
Tokens are small items of information (similar to tags) that visualize previously selected items. Tokenizer is the container that handles tokens. Tokens can be added, removed, selected, or deselected. Used only with Tokenizer container in multi-combo box, multi-input, or value help dialog.
When to use:
- Visualize previously selected items
- Display multiple selections as removable tokens
- Used within Tokenizer container
- Multi-combo box implementation
- Multi-input control
- Value help dialog with multiple selections
When to avoid:
- ❌ Without Tokenizer container → Tokens require Tokenizer
- ❌ Single selection controls → Use other selection methods
- ❌ Outside multi-combo box, multi-input, or value help dialog → Not supported
- ❌ Static tags that cannot be removed → Use Generic Tag instead
Best practices:
- ✅ Only use with Tokenizer as container
- ✅ Use Tokenizer only in multi-combo box, multi-input, or value help dialog
- ✅ Tokens can be added, removed, selected, or deselected
- ✅ Visualize selected items as small information chunks
- ✅ Allow users to remove tokens individually
- ✅ Provide clear visual feedback for selected/deselected state
- ✅ Similar to tags but specifically for selected items
- ⚠️ Tokens require Tokenizer container - cannot be used standalone
- ⚠️ Limited to specific components (multi-combo box, multi-input, value help dialog)
- ❌ Don't use outside supported components
Tokenizer
Description:
Tokenizer is a container that wraps multiple tokens. Used standalone or within input controls such as Multi Input. In cozy mode, users can swipe tokens left or right. Container for managing multiple token selections.
When to use:
- Container for multiple tokens
- Within Multi Input control
- Within Multi Combobox control
- As standalone component for token management
- Managing multiple selected items as tokens
- Need to display and manage removable selections
When to avoid:
- ❌ Single selection → Use other single-selection controls
- ❌ Static non-removable items → Use List or other display component
- ❌ Without tokens → No need for tokenizer
- ❌ Simple tag display → Use Generic Tag component
Best practices:
- ✅ Container that wraps multiple tokens
- ✅ Use in Multi Input, Multi Combobox, or standalone
- ✅ Cozy mode: users can swipe tokens left or right
- ✅ Allows adding, removing, selecting, deselecting tokens
- ✅ Provides container for token management
- ✅ Supports keyboard navigation between tokens
- ✅ Clear visual separation between tokens
- ⚠️ In cozy mode, enable swipe gestures for token interaction
- ⚠️ Ensure adequate space for token display
- ❌ Don't use without actual tokens
Upload Collection
Description:
Upload Collection allows users to upload single or multiple files from device (desktop, tablet, phone) to SAP app. Shows list of uploaded files that can be modified. Users can add/remove files and change file names. Typically displayed in Attachments tab but can appear elsewhere.
When to use:
- Show list of uploaded files that can be modified
- Allow users to add or remove files
- Allow users to change file names
- Multiple file uploads needed
- Display uploaded attachments
- Manage collection of uploaded files
- Replacing old sap.ca.ui.FileUpload control
When to avoid:
- ❌ User can upload only one file → Use File Uploader control instead
- ❌ Files are read-only (no modification needed) → Use simple List
- ❌ Simple file selection without upload management → Use File Uploader
Best practices:
- ✅ Use for modifiable list of uploaded files
- ✅ Allow adding and removing files
- ✅ Allow changing file names
- ✅ Support single or multiple file uploads
- ✅ Works on desktop, tablet, and phone
- ✅ Typically display in Attachments tab
- ✅ Show file metadata (name, size, type, date)
- ✅ Provide delete/remove action for each file
- ✅ Allow file name editing
- ✅ Show upload progress for new files
- ⚠️ For single file upload, use File Uploader instead
- ⚠️ Consider file size limits and validation
- ❌ Don't use for single-file-only scenarios
1---2name: component-guidance-forms3description: Fiori guidelines for form controls and input components such as Checkbox, Input, Select, Textarea, Date Picker, etc4---56# Component Guidance - Forms & Inputs78Form controls and input components for data entry.910## When to Use This Skill1112Use this skill when:1314- The user asks "Should I use [component] for [use case]?"15- The user needs to choose between similar components16- The user asks about component best practices17- The user wants to know when NOT to use a component1819This skill covers: Checkbox, Combobox Input, Date Picker, Fieldset, File Uploader, Form Grid, Form Group, Form Header, Form Item, Form Label, Form Message, Input, Input Group, Multi ComboBox, Multi Input, Radio, Select, Slider, Step Input, Switch, Textarea, Time, Time Picker, Token, Tokenizer, Upload Collection2021## Checkbox2223**Description:**24A checkbox lets users set a binary value (true/false). When selected, it toggles between checked (state applies), unchecked (state doesn't apply), and optionally tri-state/indeterminate (mixed selection of dependent fields). All options are visible, and users can make one or more independent selections.2526**When to use:**2728- Only one option can be selected or deselected (e.g., accept terms of use) when meaning is obvious29- A group or list of options can be selected independently of each other30- Options are displayed immediately without user interaction31- Intermediate selection state (tri-state) is required when multiple sub-options are grouped under a parent option3233**When to avoid:**3435- ❌ User needs to choose multiple options from a large list → Use Combo Box Input instead36- ❌ User can choose only one option from a list → Use Radio Buttons, Select, or List instead37- ❌ User needs to perform instantaneous actions without reviewing or confirming → Use Switch instead38- ❌ Not enough space available on screen → Use Combo Box instead3940**Best practices:**4142- ✅ Checked state means the described state applies or item is chosen43- ✅ Unchecked state means the described state doesn't apply44- ✅ Tri-state/indeterminate indicates neither checked nor unchecked (set via JavaScript `indeterminate` property)45- ✅ Use tri-state to represent mixed selection when some (but not all) dependent fields are selected46- ✅ All options visible without user interaction47- ⚠️ Tri-state is visual only and cannot be achieved by direct user interaction48- ⚠️ Use for independent selections where multiple options can be selected simultaneously4950---5152---5354## Combobox Input5556**Description:**57Combobox allows users to select item from predefined list. Provides editable input field for filtering list and dropdown menu with available options. If entries not validated by app, users can enter custom value. Combines input field with dropdown selection.5859**When to use:**6061- Select single item from long list of items62- List items are secondary information not needing immediate display63- Need filtering capability for large lists64- Allow custom entry if not validated65- Searchable dropdown needed66- Select from many options (more than select can handle comfortably)6768**When to avoid:**6970- ❌ Only two options → Use Switch instead71- ❌ Short list of items → Use Select component instead72- ❌ More than 200 list items → Use input field with select dialog or value help dialog73- ❌ Simple selection without filtering → Use Select7475**Best practices:**7677- ✅ Editable input field for filtering list78- ✅ Dropdown menu with available options79- ✅ Use for long lists of items80- ✅ Allow custom value entry if not validated by application81- ✅ List items are secondary - don't need immediate display82- ✅ Single item selection only83- ✅ Provide search/filter functionality84- ✅ Show filtered results as user types85- ⚠️ For 2 options, use Switch86- ⚠️ For short lists, Select is simpler87- ⚠️ For >200 items, use dialog-based selection88- ❌ Don't use for very short lists8990---9192---9394## Date Picker9596**Description:**97Date Picker lets users select localized date using touch, mouse, or keyboard input. Responsive behavior for all devices - compact mode (smaller) and cozy mode (touch-friendly). Two parts: Input Field (direct entry or picker) and Date Picker (day/month/year/year ranges views).9899**When to use:**100101- Users need to enter single date102- Navigate directly from one month or year to another103- Enter lots of data fast or primarily using keyboard104- Single date selection needed105- Responsive date input required106- Direct date entry or picker selection107108**When to avoid:**109110- ❌ Combined date and time input → Use Date/Time Picker instead111- ❌ Keep calendar visible and prominent → Use Calendar instead112- ❌ Enter date range → Use Date Range Picker instead113- ❌ Multiple dates selection → Use appropriate multi-date picker114115**Best practices:**116117- ✅ Input field for direct date entry or picker selection118- ✅ Date picker shows day view, month view, year view, year ranges119- ✅ Compact mode: smaller size120- ✅ Cozy mode: touch-friendly size121- ✅ Responsive behavior for all devices122- ✅ Use touch, mouse, or keyboard input123- ✅ Navigate directly between months/years124- ✅ Single date selection125- ✅ Localized date format126- ⚠️ For date+time, use Date/Time Picker127- ⚠️ For ranges, use Date Range Picker128- ❌ Don't use for date ranges129130---131132---133134## Fieldset135136**Description:**137A fieldset gives semantic meaning to a group of elements inside a form (e.g., Billing or Shipping Address). Grouping fields provides styling and accessibility benefits, and is especially important for checkbox groups and radio button groups.138139**When to use:**140141- Group related form elements semantically (e.g., Billing Address, Shipping Address)142- Group checkbox groups for accessibility143- Group radio button groups for accessibility144- Provide semantic structure to form sections145146**When to avoid:**147148- ❌ Grouping unrelated form elements together149- ❌ Using fieldset when simpler grouping methods suffice for non-form content150151**Best practices:**152153- ✅ Always use fieldset for checkbox groups (accessibility requirement)154- ✅ Always use fieldset for radio button groups (accessibility requirement)155- ✅ Use `<legend>` element to provide a label for the fieldset156- ✅ Provides both styling and accessibility benefits157- ✅ Use for semantic grouping of related form fields158- ⚠️ Checkbox and radio button groups should always be grouped with fieldset159- ⚠️ Essential for screen reader users to understand field relationships160161---162163---164165## File Uploader166167**Description:**168The file uploader lets users select and upload one or more files using their local file explorer. It's an opinionated composition of input and button components designed for simple upload tasks with automatic upload start upon file selection.169170**When to use:**171172- Upload one or more files using local file explorer173- Upload files by dragging and dropping174- Simple upload tasks where file management isn't needed175- Uploading single files (works best for this case)176177**When to avoid:**178179- ❌ Uploading large files that may take a long time → Use upload collection instead180- ❌ Users need to see upload status → Use upload collection instead181- ❌ Users need a preview of uploaded files → Use upload collection instead182- ❌ Users may need to rename uploaded files → Use upload collection instead183- ❌ Users need to manage multiple uploads (delete, rearrange, rename files) → Use upload collection instead184185**Best practices:**186187- ✅ Best suited for uploading single files188- ✅ Uploading starts automatically when files are selected189- ✅ Supports both file explorer selection and drag-and-drop190- ✅ Includes only input field or button for simplicity191- ⚠️ For multiple file management features, use upload collection component192- ⚠️ Not suitable for large files or when upload status visibility is required193194---195196---197198## Form Grid199200**Description:**201The form grid provides responsive layouts for forms on a 12-column grid with four breakpoints (Small <600px, Medium 601-1024px, Large 1025-1440px, Extra-large >1441px). It supports configurable label-field ratios (X:Y:Z format) and adapts layouts based on form width, not screen width.202203**When to use:**204205- Create responsive form layouts that adapt to different form widths206- Balance form layout between labels, fields, and empty columns207- Single-column layouts for mobile/dialogs (Small size)208- Two-column layouts for larger screens (Large/Extra-large sizes)209- Split-screen or full-screen form views with specific label-field ratios210- Forms requiring vertical layout (labels above fields) or horizontal layout (labels beside fields)211212**When to avoid:**213214- ❌ Simple forms that don't need responsive grid behavior215- ❌ When a simpler form layout component suffices216217**Best practices:**218219- ✅ Use single-column layout for small forms (mobile/dialogs) - labels above fields220- ✅ Use two-column layout for large/extra-large forms to avoid scrolling221- ✅ Adapt label-field ratio based on context: 2:10:0 (default medium), 4:7:1 (split-screen), 3:5:4 (full-screen)222- ✅ Use 4:8:0 ratio for long labels/input values at medium width223- ✅ All forms display vertical layout under Small breakpoint automatically224- ✅ Position form groups side-by-side in Z layout for large/extra-large sizes225- ✅ Use recommended column numbers to maximize screen space and avoid unnecessary scrolling226- ⚠️ Breakpoints depend on form width, not screen width227- ⚠️ Empty grid columns (Z in X:Y:Z ratio) prevent excessive input field stretching228- ⚠️ Change default label-field ratio according to your app's specific needs229230---231232---233234## Form Group235236**Description:**237Form groups assemble form elements with labels, messages, and help containers. Components like `fd-form__item` with label and control can be used independently when error messages aren't needed.238239**When to use:**240241- Assemble complete form elements with labels, controls, messages, and help text242- Group related form fields with validation messages243- Create structured form layouts with consistent spacing244- Need error messages, help text, or validation feedback alongside form fields245246**When to avoid:**247248- ❌ Simple form fields that don't need error messages or help text → Use `fd-form__item` alone instead249- ❌ When minimal form structure suffices250251**Best practices:**252253- ✅ Use full form group when error messages or help containers are needed254- ✅ Use `fd-form__item` with label and control alone for simpler fields without messages255- ✅ Components can be used independently based on needs256- ✅ Provides consistent structure for labels, controls, messages, and help text257- ⚠️ Not every form field needs the full form group structure258- ⚠️ Choose minimal necessary components to avoid over-engineering simple forms259260---261262---263264## Form Header265266**Description:**267Form headers are titles that provide context about a group of input fields. For example, "Personal Information" would categorize fields like Name, Address, etc.268269**When to use:**270271- Provide context and categorization for groups of input fields272- Organize form sections with descriptive titles273- Help users understand what information belongs in each form section274- Create visual hierarchy in long or complex forms275276**When to avoid:**277278- ❌ Single input field that doesn't need categorization279- ❌ When field labels alone provide sufficient context280281**Best practices:**282283- ✅ Use descriptive titles that clearly categorize the grouped fields (e.g., "Personal Information", "Billing Address")284- ✅ Place header before the related group of input fields285- ✅ Use for organizing complex forms into logical sections286- ✅ Helps users scan and navigate long forms efficiently287- ⚠️ Keep header text concise and meaningful288- ⚠️ Don't overuse - only when grouping provides real value289290---291292---293294## Form Item295296**Description:**297A form item combines a label and an input field. The label clearly describes the expected input and is associated with the input for accessibility.298299**When to use:**300301- Combine label and input field as a single form element302- Optional inputs that don't require validation or indication (default)303- Required inputs that need visual and accessible indication (use `fd-form-label--required`)304- Ensure accessible association between label and input305306**When to avoid:**307308- ❌ Input without a label (fails accessibility requirements)309- ❌ When more complex form structure with messages is needed → Use Form Group instead310311**Best practices:**312313- ✅ Use default form item for optional inputs without validation314- ✅ Mark required inputs with `fd-form-label--required` modifier class315- ✅ Set `aria-required="true"` on required input fields for screen readers316- ✅ Associate label with input using `for` attribute and matching `id`317- ✅ Label clearly describes the expected input318- ⚠️ Always provide accessible labels for form inputs319- ⚠️ Required fields need both visual indicator (modifier) and ARIA attribute320321---322323---324325## Form Label326327**Description:**328Form labels identify form elements like input fields, checkboxes, and radio buttons. Best used as a child element of Form Item component.329330**When to use:**331332- Identify any form element (input field, checkbox, radio button)333- Optional fields without special styling (default)334- Required fields with visual and programmatic indication (`fd-form-label--required`)335- Labels that need a colon displayed (`fd-form-label--colon`)336- Disabled form elements requiring visual indication337338**When to avoid:**339340- ❌ Form elements without labels (fails accessibility)341- ❌ Using label outside of form context342343**Best practices:**344345- ✅ Use default form label for optional fields346- ✅ Add `fd-form-label--required` modifier for required fields347- ✅ Use `required` and `aria-required="true"` attributes on input for required fields348- ✅ Add `fd-form-label--colon` modifier to display label with colon349- ✅ Show disabled state using one of three methods: `aria-disabled="true"`, `is-disabled` class, or `fd-form-label--disabled` modifier350- ✅ Best used as child element of Form Item component351- ⚠️ Disabled labels need both visual (class/modifier) and programmatic (`aria-disabled="true"`) indication352- ⚠️ Associate label with form element using `for` attribute353354---355356---357358## Form Message359360**Description:**361Form messages display value state text (success, error, warning, information) shown when focus is on the input field. They work with input control value states to provide feedback to users.362363**When to use:**364365- Display validation feedback for form inputs366- Show success messages after successful input367- Display error messages for invalid input368- Show warning messages for potential issues369- Provide informational messages about input requirements370- Communicate value state to users when input has focus371372**When to avoid:**373374- ❌ Messages unrelated to form validation or input state375- ❌ Critical system messages → Use message strip or alert instead376377**Best practices:**378379- ✅ Use `is-success`, `is-error`, `is-warning`, `is-information` classes on input element (`fd-input`)380- ✅ Use matching `fd-form-message--success`, `--error`, `--warning`, `--information` modifiers on message element381- ✅ Message appears when focus is on the input field382- ✅ Match input state class with corresponding message modifier383- ✅ Provide clear, actionable feedback in message text384- ⚠️ Four value states available: success, error, warning, information385- ⚠️ Input and message states must match for visual consistency386387---388389---390391## Input392393**Description:**394Text input fields allow users to enter and edit single-line text, numbers, dates, or times. They should always be paired with a label, and required fields should have an asterisk (\*). Features include autocomplete, suggestions, and value help for valid data entry.395396**When to use:**397398- Enter short, single-line text or numbers, dates, or times399- Enter password, URL, phone number, or email address400- Select a single item from a large dataset (more than 200 items)401- Find an object by searching multiple attributes (ID, city, customer name) - use with autocomplete and value help402- Select one or more items from a list (multi-input)403- Find items from a list by searching multiple attributes (combobox)404405**When to avoid:**406407- ❌ Entering dates and times → Use date picker, date range selection, or date/time picker instead408- ❌ Entering long texts → Use textarea instead409- ❌ Carrying out a search → Use search field instead410- ❌ Selecting multiple values → Use multi-combo box (<200 items) or multi-input field (>200 items) instead411- ❌ Selecting from small set of values (<20 items) → Consider select control instead412413**Best practices:**414415- ✅ Always pair input with a label416- ✅ Mark required fields with asterisk (\*) in label417- ✅ Use autocomplete and suggestions for better user experience418- ✅ Provide value help for complex data entry419- ✅ For small sets (<20 items), use select control420- ✅ For medium sets (20-200 items), use combo box421- ✅ For large sets (>200 items), use input with value help422- ⚠️ Single-line text only - use textarea for multi-line423- ⚠️ Required fields must have visual indicator (asterisk) in label424425---426427---428429## Input Group430431**Description:**432Input Group combines form inputs with add-ons (text, icons, or buttons) to help users understand the information being entered. Add-ons can be positioned before, after, or on both sides of the input field. Supports validation states (success, error, warning, information).433434**When to use:**435436- Add text add-ons to clarify value format (e.g., currency, units)437- Add icon add-ons as visual cues (visibility toggles, status indicators)438- Add button add-ons for actions (submit, search, trigger)439- Display validation or feedback states visually440- Provide context about expected input format or units441442**When to avoid:**443444- ❌ Simple inputs that don't need additional context → Use basic input instead445- ❌ Complex actions that need more than a simple button → Consider separate action buttons446447**Best practices:**448449- ✅ Position add-ons logically: before (prefix), after (suffix), or both sides450- ✅ Use text add-ons for units or currency symbols451- ✅ Use icon add-ons for visual cues (e.g., visibility toggle, status)452- ✅ Use button add-ons for actions like submit or search453- ✅ Apply state classes: `.is-success`, `.is-error`, `.is-warning`, `.is-information` on `.fd-input-group`454- ✅ Use `.is-focus` class on `.fd-input-group` for focused state455- ✅ Buttons can contain text or icons456- ⚠️ Add-ons should clarify or enhance input understanding, not clutter457- ⚠️ State modifiers must be applied to the input group container458459---460461---462463## Multi ComboBox464465**Description:**466Multi ComboBox enables users to select options from predefined list or enter custom text. Provides editable input field to filter list and dropdown arrow to open options. Select options have checkboxes permitting multiple selection. Combines filtering with multi-selection capability.467468**When to use:**469470- Select one or more options from long list (no more than ~200)471- Values contain secondary information not needing immediate display472- Multiple selection from filtered list needed473- Editable input for filtering options474- Multi-select with search/filter capability475476**When to avoid:**477478- ❌ Select multiple ranges → Use appropriate range selector479- ❌ Select or search multiple business objects → Use specialized selector480- ❌ Short list of items → Use simpler multi-select component481- ❌ Add custom values → Use Multi Input instead482- ❌ List contains >200 items → Use dialog-based selection483484**Best practices:**485486- ✅ Editable input field to filter list487- ✅ Dropdown arrow to open options list488- ✅ Checkboxes for multiple selection489- ✅ Use for long lists (up to ~200 items)490- ✅ Secondary information in values491- ✅ Filter as user types492- ✅ Show selected items as tokens493- ✅ Allow deselection of items494- ⚠️ Maximum ~200 items495- ⚠️ For custom values, use Multi Input496- ❌ Don't use for short lists497498---499500---501502## Multi Input503504**Description:**505Multi Input allows users to enter multiple values displayed as tokens. Provides editable input field for filtering list and dropdown menu with available options. If entries not validated, users can enter custom values. Supports value help for selecting/searching multiple business objects and ranges.506507**When to use:**508509- Provide value help to select or search multiple business objects510- Let users select multiple ranges (with value help)511- Enable users to add custom values512- Multiple values displayed as tokens513- Editable input for custom entries514- Value help dialog for complex selection515516**When to avoid:**517518- ❌ Choose multiple options from large list → Use Multi ComboBox instead519- ❌ Not enough space on screen → Consider alternative520- ❌ Choose only one option → Use single-select component521- ❌ Simple multi-selection without custom values → Use Multi ComboBox522523**Best practices:**524525- ✅ Multiple values displayed as tokens526- ✅ Editable input field for filtering527- ✅ Dropdown menu with available options528- ✅ Allow custom value entry if not validated529- ✅ Use value help for multiple business objects530- ✅ Support multiple range selection with value help531- ✅ Show selected values as removable tokens532- ✅ Enable custom value entry533- ✅ Provide value help dialog for complex scenarios534- ⚠️ For predefined-only options, use Multi ComboBox535- ⚠️ Requires adequate screen space536- ❌ Don't use for single selection537538---539540---541542## Radio543544**Description:**545Radio buttons provide mutually exclusive options, allowing users to select only one option from two or more choices. They only work in groups and are best for selecting from a small set of clearly different alternatives.546547**When to use:**548549- Users need to choose only one option from different alternatives550- Users need to see all options at once without interacting with a dropdown551- Small set of options (no more than 8)552- Users need to trigger an immediate change without pressing Submit553- Users need to choose quickly between at least two clearly different choices554555**When to avoid:**556557- ❌ Users need to select more than one option → Use checkboxes instead558- ❌ Users need to select items in a list → Use checkboxes or direct tap selection559- ❌ Users are expected to go with the most common option → Use dropdown with default instead560- ❌ Users are choosing between just two options → Use single checkbox or toggle switch instead561- ❌ More than 8 options to present → Use dropdown box or list view instead562- ❌ Options are numbers with fixed steps → Use slider control instead563- ❌ Users need to select a value from a range → Use slider instead564565**Best practices:**566567- ✅ Align radio buttons vertically, especially for long labels (easier to read and localize)568- ✅ Use horizontal alignment only for one-word labels (e.g., background color settings)569- ✅ Always align vertically in forms (label length varies across languages)570- ✅ Use group labels and padding to separate multiple radio button groups571- ✅ Default: long labels truncate with ellipsis572- ✅ Use `.fd-radio__label--wrap` modifier for labels that wrap to new line (set max-width on label)573- ✅ Use `.fd-radio__label--wrap-top-aligned` for top-left aligned wrapping labels574- ⚠️ Radio buttons only work in groups for mutually exclusive options575- ⚠️ Don't put two radio button groups next to each other without clear separation576- ⚠️ Maximum 8 options - use dropdown for more577578---579580---581582## Select583584**Description:**585Select component (dropdown) lets users pick one item from a small, predefined list. Can be placed in toolbars (chart, footer, header), forms, or tables. List stays hidden until opened.586587**When to use:**588589- Choose only one item from short list (typically 2-12 items)590- Users don't need to see all options at once591- Helpful to start with default selection (especially if one option used most often)592- Predefined list instead of free-form text input593- Logically grouped list with common items first, others sorted594- Space-saving alternative to radio buttons595596**When to avoid:**597598- ❌ Only two options → Use switch instead599- ❌ Very large set of items → Use combo box instead600- ❌ Display multiple attributes or search on multiple attributes → Use input field with select dialog or value help dialog601- ❌ Need to display all options without interaction → Use radio buttons instead602- ❌ More than 12 options → Consider combo box with search603604**Best practices:**605606- ✅ Keep texts concise, avoid complex content607- ✅ Define default selection whenever possible608- ✅ Sort values in meaningful order (common first, then alphabetical/numerical/topical)609- ✅ Use appropriate text for "not selected" option (not blank)610- ✅ Use fixed width (don't auto-adjust based on selection)611- ✅ In two-column layout, place most relevant value in first column612- ✅ Keep selection list items simple and scannable613- ⚠️ Avoid icons in selection list - if used, ensure they match text614- ⚠️ Avoid disabling selection options when possible615- ❌ Don't overload with too many options616- ❌ Don't use blank value for "not selected"617618---619620---621622## Slider623624**Description:**625Slider allows users to adjust a value along continuous or gradual range. Handles values that change smoothly (volume, brightness). Provides immediate visual feedback. Range Slider variant lets users select min/max value range within predefined interval.626627**When to use:**628629- Adjust value along continuous or gradual range630- Handle values that change smoothly (volume, brightness, saturation, contrast)631- Allow quick adjustments without typing632- Provide immediate visual feedback as handle moves633- Select min/max value range (use Range Slider)634- Display and adjust settings visually635636**When to avoid:**637638- ❌ Making specific choices (categories, list items) → Use radio buttons or checklists639- ❌ Without full accessibility support → Use dropdown or input field instead640- ❌ Space is limited (small screens) → Use smaller input options641- ❌ Precise numeric input needed → Use number input field642- ❌ Single value selection when Range Slider used → Use standard Slider643644**Best practices:**645646- ✅ Always label slider to indicate what selected value represents647- ✅ Keep custom slider labels short and meaningful648- ✅ Use steps that match required precision (smaller steps for exact values)649- ✅ Display unit of measurement (%, kg, °C) next to slider or input field650- ✅ Display current value near slider or in connected input field651- ✅ Choose appropriate size for use case652- ✅ Use stepped increments for predefined intervals653- ✅ Ensure values are clearly labeled for context654- ✅ Show current value as user interacts655- ✅ Ensure keyboard interaction support656- ✅ Provide visible value indicators and clear min/max labels657- ⚠️ Consider screen size - sliders take up space658- ⚠️ Match step size to precision requirements659- ❌ Don't use without accessibility support660661---662663---664665## Step Input666667**Description:**668Step Input allows users to adjust numeric values in predefined increments (steps) using buttons or direct input. Useful for quantities or measurements without manually typing every number. Supports keyboard and mouse interactions, customizable with min, max, and step values.669670**When to use:**671672- Adjust amounts, quantities, or numeric values quickly673- Change values in defined increments (e.g., shopping cart quantities)674- Need increment/decrement buttons for numeric input675- Users benefit from predefined step values676- Quick numeric adjustments needed677678**When to avoid:**679680- ❌ Fixed numbers (postal code, phone number, ID) → Use regular input field681- ❌ Values that rarely change or don't follow steps (account number) → Use regular input field682- ❌ Entering dates or times → Use Date Picker, Time Picker, or Date/Time Picker683- ❌ Free-form numeric input without increments → Use number input684685**Best practices:**686687- ✅ Provide increment/decrement buttons688- ✅ Allow direct input via keyboard689- ✅ Set appropriate min, max, and step values690- ✅ Support both keyboard and mouse interactions691- ✅ Use for quantities that change in defined steps692- ✅ Display current value clearly693- ✅ Disable buttons at min/max boundaries694- ✅ Use in shopping carts, quantity selectors, measurement adjustments695- ⚠️ Define reasonable step increments for use case696- ⚠️ Set min/max values to prevent invalid entries697- ❌ Don't use for fixed or rarely changing values698699---700701---702703## Switch704705**Description:**706Switch mimics a physical switch, allowing users to toggle individual features on or off. Mainly used for settings, personalization, and cases where impact is directly recognizable. Changes take immediate effect.707708**When to use:**709710- Set something as active or inactive (e.g., dialog, feature toggle)711- Clearly show mode or state of a setting712- Change takes immediate effect without confirmation713- Toggle between two mutually exclusive states (on/off)714- Settings and personalization options715- Binary choices with immediate impact716717**When to avoid:**718719- ❌ Additional steps required for changes to take effect → Use Checkbox instead720- ❌ Requires confirmation or Submit button → Use Checkbox instead721- ❌ Unclear if showing state or action → Use Checkbox instead722- ❌ More than two options → Use Radio buttons or Select723- ❌ Part of form requiring submission → Use Checkbox724725**Best practices:**726727- ✅ Use for immediate on/off toggles728- ✅ Clearly show current mode or state729- ✅ Use for settings and personalization730- ✅ Ensure impact of toggle is directly recognizable731- ✅ Provide clear labels describing what is being toggled732- ✅ Show visual feedback for on/off states733- ✅ Changes take effect immediately without confirmation734- ⚠️ Don't use if change requires confirmation735- ⚠️ Ensure it's clear whether showing state or action736- ❌ Don't use as part of form requiring Submit737738---739740---741742## Textarea743744**Description:**745Textarea is an input component that allows users to enter multiple lines of unformatted text. Optionally includes a character counter displayed below the textarea.746747**When to use:**748749- Users need to enter multiple lines of text750- Users need to enter unformatted text across several lines751- Display character count (entered or remaining) with counter feature752- Long-form text input without formatting requirements753754**When to avoid:**755756- ❌ Users only need to enter a single line of text → Use input component instead757- ❌ Users need to enter formatted text → Use rich text editor instead758759**Best practices:**760761- ✅ Use for multi-line unformatted text entry762- ✅ Add counter to display number of characters entered or remaining763- ✅ Counter is displayed below the textarea764- ✅ Provide clear label describing expected content765- ⚠️ For single-line text, use input component instead766- ⚠️ For formatted text needs, use rich text editor767768---769770---771772## Time773774**Description:**775Time component is used to select a time value. Can choose hours, minutes, seconds, and/or period of day. Rarely used alone - typically paired with Time Picker pattern. Supports time selection, time ranges, and detailed durations.776777**When to use:**778779- User needs to select a specific time780- User needs to select time range (start time and end time)781- User needs to select detailed duration (e.g., 1 minute 30 seconds)782- Precise time selection required783- Used within Time Picker pattern784785**When to avoid:**786787- ❌ Selecting simple duration (15min, 30min, 1hr, 2hr) → Use Select component instead788- ❌ Selecting date and time together → Use Date Picker (date/time variant) instead789- ❌ Approximate time needed → Consider simpler selection method790- ❌ Only hour selection needed → Use Select with hour options791792**Best practices:**793794- ✅ Typically used within Time Picker pattern795- ✅ Can select hours, minutes, seconds, and period (AM/PM)796- ✅ Use for precise time selection797- ✅ Use two time pickers for time ranges (start and end)798- ✅ Support detailed duration selection (minutes and seconds)799- ✅ Provide clear labels for time fields800- ✅ Use 12-hour or 24-hour format based on locale801- ✅ Enable keyboard input for faster entry802- ⚠️ For simple durations, Select is more appropriate803- ⚠️ For date+time, use Date Picker instead804- ❌ Don't use alone - pair with Time Picker pattern805806---807808---809810## Time Picker811812**Description:**813Time Picker lets users select localized time using touch, mouse, or keyboard in 12/24-hour format. Users can type directly or use visual clock face for hours, minutes, seconds. Contains time input field and time picker popover with clock faces. Supports cozy and compact modes.814815**When to use:**816817- Users need to select a time818- Users need to select time range (use two time pickers for start and end)819- Users need to select specific duration (e.g., 1 minute 30 seconds)820- Visual clock face selection is helpful821- Precise time input required822823**When to avoid:**824825- ❌ Selecting simple duration (15min, 30min, 1hr) → Use Select instead826- ❌ Selecting date and time together → Use Date Picker (date/time variant)827- ❌ Only approximate time needed → Simpler selection method828829**Best practices:**830831- ✅ Time input field for direct entry or button to open popover832- ✅ Time picker popover with clock faces (hours, minutes, optional seconds)833- ✅ Hours clock face shows 12 or 24 hours based on format834- ✅ Optional seconds clock face (omit if not relevant)835- ✅ AM/PM switch using segmented button (12-hour format)836- ✅ Optional "Now" button (transparent icon button)837- ✅ Footer with Bar component and decisive buttons838- ✅ Cozy mode for larger touch targets, compact mode for dense UIs839- ✅ Mobile (size S): popover opens in subview, not below input field840- ✅ Two input methods: direct entry or clock face selection841- ✅ Enable keyboard, mouse, and touch input842- ✅ Use two time pickers for time ranges843- ⚠️ On mobile, time input field opens time input popover with touch keyboard844- ⚠️ Choose format (12/24-hour) based on locale845- ❌ Don't force clock face only - allow direct text entry846847---848849---850851## Token852853**Description:**854Tokens are small items of information (similar to tags) that visualize previously selected items. Tokenizer is the container that handles tokens. Tokens can be added, removed, selected, or deselected. Used only with Tokenizer container in multi-combo box, multi-input, or value help dialog.855856**When to use:**857858- Visualize previously selected items859- Display multiple selections as removable tokens860- Used within Tokenizer container861- Multi-combo box implementation862- Multi-input control863- Value help dialog with multiple selections864865**When to avoid:**866867- ❌ Without Tokenizer container → Tokens require Tokenizer868- ❌ Single selection controls → Use other selection methods869- ❌ Outside multi-combo box, multi-input, or value help dialog → Not supported870- ❌ Static tags that cannot be removed → Use Generic Tag instead871872**Best practices:**873874- ✅ Only use with Tokenizer as container875- ✅ Use Tokenizer only in multi-combo box, multi-input, or value help dialog876- ✅ Tokens can be added, removed, selected, or deselected877- ✅ Visualize selected items as small information chunks878- ✅ Allow users to remove tokens individually879- ✅ Provide clear visual feedback for selected/deselected state880- ✅ Similar to tags but specifically for selected items881- ⚠️ Tokens require Tokenizer container - cannot be used standalone882- ⚠️ Limited to specific components (multi-combo box, multi-input, value help dialog)883- ❌ Don't use outside supported components884885---886887---888889## Tokenizer890891**Description:**892Tokenizer is a container that wraps multiple tokens. Used standalone or within input controls such as Multi Input. In cozy mode, users can swipe tokens left or right. Container for managing multiple token selections.893894**When to use:**895896- Container for multiple tokens897- Within Multi Input control898- Within Multi Combobox control899- As standalone component for token management900- Managing multiple selected items as tokens901- Need to display and manage removable selections902903**When to avoid:**904905- ❌ Single selection → Use other single-selection controls906- ❌ Static non-removable items → Use List or other display component907- ❌ Without tokens → No need for tokenizer908- ❌ Simple tag display → Use Generic Tag component909910**Best practices:**911912- ✅ Container that wraps multiple tokens913- ✅ Use in Multi Input, Multi Combobox, or standalone914- ✅ Cozy mode: users can swipe tokens left or right915- ✅ Allows adding, removing, selecting, deselecting tokens916- ✅ Provides container for token management917- ✅ Supports keyboard navigation between tokens918- ✅ Clear visual separation between tokens919- ⚠️ In cozy mode, enable swipe gestures for token interaction920- ⚠️ Ensure adequate space for token display921- ❌ Don't use without actual tokens922923---924925---926927## Upload Collection928929**Description:**930Upload Collection allows users to upload single or multiple files from device (desktop, tablet, phone) to SAP app. Shows list of uploaded files that can be modified. Users can add/remove files and change file names. Typically displayed in Attachments tab but can appear elsewhere.931932**When to use:**933934- Show list of uploaded files that can be modified935- Allow users to add or remove files936- Allow users to change file names937- Multiple file uploads needed938- Display uploaded attachments939- Manage collection of uploaded files940- Replacing old sap.ca.ui.FileUpload control941942**When to avoid:**943944- ❌ User can upload only one file → Use File Uploader control instead945- ❌ Files are read-only (no modification needed) → Use simple List946- ❌ Simple file selection without upload management → Use File Uploader947948**Best practices:**949950- ✅ Use for modifiable list of uploaded files951- ✅ Allow adding and removing files952- ✅ Allow changing file names953- ✅ Support single or multiple file uploads954- ✅ Works on desktop, tablet, and phone955- ✅ Typically display in Attachments tab956- ✅ Show file metadata (name, size, type, date)957- ✅ Provide delete/remove action for each file958- ✅ Allow file name editing959- ✅ Show upload progress for new files960- ⚠️ For single file upload, use File Uploader instead961- ⚠️ Consider file size limits and validation962- ❌ Don't use for single-file-only scenarios963964---965966---