Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Pattern format

Introduction

Pattern format represents a component that is used for formatting and displaying numbers and numeric values according to your specified pattern. This component is a part of @react-form-builder/components-rsuite.

Pattern format is used to format numeric values, such as phone numbers, credit card numbers, or other types of numeric data. It takes a provided value as input and returns a formatted string that matches your provided configuration.

By leveraging provided options and properties, you can create a customized format component that meets your specific use case and enhances your form.

Main properties

The properties located within the Main tab. These allow you to provide general format configuration:

NameTypeDescription
LabelstringProvide a name for your input field
ValuestringEnter default value for the input field
PlaceholderstringSpecify placeholder for the input field. Will not visible if a Value is provided
SizechoiceSelect the component size from extra small to large
DisabledbooleanDisables the component
Read OnlybooleanMakes the component read-only
FormatstringDefines the format pattern using the # (or a Pattern char ) character. # is the placeholder character for numbers
MaskstringUse this to specify a mask character for each numeric position. The mask character will be displayed until a numeric character is entered. You can use different mask characters for each position by providing an array of mask characters. Important: Make sure the number of mask characters matches the number of pattern characters
Pattern charstringHelps define the format pattern character; i.e., replace #
Allow empty formattingbooleanBy default, PatternFormat component does not apply formatting when value is empty (null, undefined or empty string). If you want to apply formatting on empty values, set this to true

At the bottom of the Main properties menu, you can find additional options:

Style properties

These are properties that allow to customize the size, color and other style properties of your component:

  • For Device: You can provide component's style customization for all devices or specific devices by using this dropdown list. Refer to Adaptive Layout for more details.
  • Component > Class Name: Add a class name for your component for the subsequent styling if necessary.
  • Wrapper: The options below enable you to tailor the appearance of your component and customize it for a specific device type, as selected in the For Device property:

    NameTypeDescription
    WidthnumberSpecifies the width for your component
    HeightnumberSpecifies the height for your component
    Margin top/right/bottom/leftnumberMargin values for you component
    ColorstringAllows customizing the text color
    Background colorstringEnables customizing the background color
Stay in the know
Quickly Build Drag-and-Drop Forms
Star us on GitHub