Package org.patternfly.component.help


package org.patternfly.component.help
Provides helper text components for displaying supplementary information alongside form controls.

This package contains the HelperText component and its sub-components for showing contextual help messages, validation feedback, and status information. Helper text items support different validation statuses (default, indeterminate, warning, success, error) and can display static or dynamic content with optional custom icons.

Components

  • HelperText - Container for one or more helper text items
  • HelperTextItem - Individual helper text message with optional status and icon

Usage

Static helper text with different validation statuses:

import static org.patternfly.component.ValidationStatus.error;
import static org.patternfly.component.ValidationStatus.success;
import static org.patternfly.component.ValidationStatus.warning;
import static org.patternfly.component.help.HelperText.helperText;
import static org.patternfly.component.help.HelperTextItem.helperTextItem;

// Simple helper text
HelperText simple = helperText("This is default helper text");
HelperText warn = helperText("This is warning helper text", warning);
HelperText err = helperText("This is error helper text", error);

// Multiple helper text items with dynamic status icons
HelperText multi = helperText()
        .addItem(helperTextItem("Must be at least 14 characters", success)
                .dynamic())
        .addItem(helperTextItem("Cannot contain the word 'redhat'", error)
                .dynamic());
See Also:
  • Classes
    Class
    Description
    Helper text is an on-screen field guideline that helps provide context regarding field inputs.