Portal Community

How Tabs Reference Sections

Tabs do not contain controls directly. Each tab entry has a sectionId that points to a form section. The controls defined in that section appear as the tab's content:

{
  "id": "applicant-tabs",
  "type": "tabs",
  "order": 1,
  "width": "full",
  "settings": {
    "tabs": [
      { "id": "tab-personal",    "label": "Personal",    "sectionId": "section-personal" },
      { "id": "tab-employment",  "label": "Employment",  "sectionId": "section-employment" },
      { "id": "tab-financial",   "label": "Financial",   "sectionId": "section-financial" },
      { "id": "tab-documents",   "label": "Documents",   "sectionId": "section-documents" }
    ],
    "defaultTab": "tab-personal"
  }
}

// Referenced sections in the same form:
"sections": [
  { "id": "section-personal",   "title": "Personal",   "controls": [...] },
  { "id": "section-employment", "title": "Employment", "controls": [...] },
  { "id": "section-financial",  "title": "Financial",  "controls": [...] },
  { "id": "section-documents",  "title": "Documents",  "controls": [...] }
]

Settings Reference

SettingTypeDefaultDescription
tabsTab[]Array of tab definitions
defaultTabstring (tab id)First tabWhich tab is active on load
variantdefault | pills | underlinedefaultVisual style of the tab bar
positiontop | lefttopPosition of the tab bar relative to content
lazyLoadbooleanfalseOnly render tab content when it is first activated
keepMountedbooleantrueKeep inactive tab content in the DOM (preserves state)
showBadgebooleanfalseShow validation error count badge on each tab

Tab Object Schema

interface TabDefinition {
  id: string;           // Unique tab identifier
  label: string;        // Tab label text
  sectionId: string;    // ID of the form section to display
  icon?: string;        // FontAwesome class (optional)
  disabled?: boolean;   // Grey out and prevent selection
  badge?: string;       // Static badge text (e.g., "New", "3")
}

Tab Variant Styles

VariantAppearanceBest For
defaultCard-style tabs with bottom border active indicatorStandard forms, dashboards
pillsRounded pill buttons, filled background when activeSettings panels, compact UI
underlineText tabs with animated underline on activeContent-heavy forms, documentation

Tabs with Icons

{
  "id": "settings-tabs",
  "type": "tabs",
  "settings": {
    "variant": "pills",
    "tabs": [
      { "id": "tab-general",   "label": "General",   "sectionId": "sec-general",   "icon": "fa-solid fa-gear" },
      { "id": "tab-security",  "label": "Security",  "sectionId": "sec-security",  "icon": "fa-solid fa-lock" },
      { "id": "tab-billing",   "label": "Billing",   "sectionId": "sec-billing",   "icon": "fa-solid fa-credit-card" },
      { "id": "tab-api",       "label": "API Keys",  "sectionId": "sec-api",       "icon": "fa-solid fa-key" }
    ]
  }
}

Validation Error Badges

When showBadge: true, each tab displays a count of validation errors in its section. This guides users to which tabs need attention before submission:

{
  "id": "application-tabs",
  "type": "tabs",
  "settings": {
    "showBadge": true,
    "tabs": [
      { "id": "tab-personal",  "label": "Personal",  "sectionId": "sec-personal" },
      { "id": "tab-financial", "label": "Financial", "sectionId": "sec-financial" }
    ]
  }
}

// If section-financial has 2 required fields empty:
// "Financial" tab shows a red badge with "2"

Lazy Loading

For forms with heavy content in non-default tabs, enable lazyLoad to defer rendering until the tab is first activated:

{
  "settings": {
    "lazyLoad": true,
    "keepMounted": false   // Unmount inactive tabs to free memory
  }
}
keepMounted vs lazyLoad With keepMounted: true (default), inactive tab content stays in the DOM hidden. Form values entered in other tabs are preserved. With keepMounted: false, content is unmounted when switching tabs — values are preserved in the FormEngine store, but any component-level state (scroll position, focused element) is lost.