Paragraph Component

1. Overview

The PARAGRAPH component provides formatted text content within the form for displaying informational text.

🛝 Use the Dynamic Form Playground to see the Paragraph component in action and try out different configurations

2. Key Features

  • Display informational text within forms
  • Multiple text size variants (small, medium, normal, large)
  • Optional icon placement before text
  • Left-alignment option for retail journeys
  • Translation and string interpolation support
  • Custom CSS classes for styling
  • Markdown support for rich text formatting

3. Configuration Properties

Base Properties

PropertyTypeRequiredDescription
type'PARAGRAPH'YesSpecifies the field type as PARAGRAPH.
idstringYesUnique identifier for the field.
renderNamestringNoOptional name added as data-render-name attribute to locate the rendered element in the DOM.
labelstringYesThe paragraph text content. Supports translation, string interpolation, and Markdown.
testIdstringNoTest identifier for automated testing. Set as data-testid attribute.
aclarrayNoAccess control rules for field visibility/editability. Each rule has state ('hidden', 'readonly', 'disabled', 'visible', 'editable') and optional condition (Filtrex expression).
columnSpannumberNoNumber of columns to span (1-12) in CUSTOM_COLUMN layout. Default: 12 (full width). See Overriding the number of grid columns when using --df-custom-columns. Only effective when paragraphWidthMatchesLayoutType is set to true in the form layout; otherwise the paragraph always spans the full width regardless.
spacingstringNoMargin spacing before next field: 'NONE' (0px), 'XS' (8px), 'S' (16px), 'M' (24px), 'L' (32px), 'XL' (40px), 'XXL' (48px).

Component Specific Properties

PropertyTypeRequiredDescription
copytextOptionstringNoThe nxCopytext variant. This determines the visuals of the paragraph.
cssClassesstringNoProperty to add css classes via configuration
iconIconDefinitionNoConfiguration of the icon to be place before the label.
layoutobjectNoThe layout of the field.
See also Layout Properties

Layout Properties

PropertyTypeRequiredDescription
leftAlignInRetailbooleanNoControls paragraph text alignment for retail journeys. Set to true to left-align text. Defaults to centered alignment.
Ignored in expert journeys, which always use left alignment.

4. Configuration Examples

Basic Paragraph

Example :
{
  "id": "paragraph-basic",
  "type": "PARAGRAPH",
  "label": "Please fill out all required fields marked with an asterisk (*). This information is necessary to process your application."
}

Paragraph with Markdown Formatting

Example :
{
  "id": "paragraph-markdown",
  "type": "PARAGRAPH",
  "label": "**Important Notice:** Your personal data will be processed according to our [Privacy Policy](https://example.com/privacy). By submitting this form, you agree to our terms."
}

Paragraph with Lists

Example :
{
  "id": "paragraph-lists",
  "type": "PARAGRAPH",
  "label": "Required documents:\n\n* Valid ID or passport\n* Proof of address\n* Recent photograph\n* Previous insurance documentation"
}

Paragraph with Icon

Example :
{
  "id": "paragraph-icon",
  "type": "PARAGRAPH",
  "label": "**Disclaimer:** The information provided is for estimation purposes only. Final premium amounts may vary based on underwriting review.",
  "icon": {
    "name": "info-circle",
    "size": "s"
  }
}

Large Paragraph with Left Alignment

Example :
{
  "id": "paragraph-large-left",
  "type": "PARAGRAPH",
  "label": "**Warning:** Providing false information may result in claim denial and policy cancellation.",
  "copytextOption": "large",
  "layout": {
    "leftAlignInRetail": true
  }
}

5. Markdown Support

The PARAGRAPH component supports standard Markdown syntax including:

  • Bold text using **text**
  • Italic text using *text*
  • Strikethrough text using ~~text~~
  • Underline text using :u[text]
  • Links using [text](url)
  • Lists using * or - for bullets
  • Line breaks using \n

6. API Reference

For complete API documentation, see DfParagraphConfig.

results matching ""

    No results matching ""