Customize the Tab Bar

Edit in →

SurveyJS offers the flexibility to add, remove, and modify tabs in its Form Builder UI to implement additional functionality as needed. In this example, we demonstrate how to manage built-in tabs and create a custom "Survey Templates" tab that enables survey authors to quickly load boilerplate surveys into Survey Creator for further customization.

Manage Built-In Survey Creator Tabs

Survey Creator includes six built-in tabs. To specify the visibility of each tab, use a dedicated configuration property:

By default, the Designer, Preview, and JSON Editor tabs are visible, while the Logic, Translations, and Themes tabs are hidden. In this demo, the Logic tab is made visible by setting the showLogicTab property to true.

Add a Custom Survey Creator Tab

If you want to add a custom tab to Survey Creator, follow the instructions below:

  1. Implement a custom component that renders tab markup.
    In this demo, the component renders buttons that load different JSON schemas into Survey Creator.

  2. Register your component under a custom name in the component collection.
    In HTML/CSS/JavaScript projects, register the component in ReactElementFactory as shown in the index.js file.
    In React, register the component in ReactElementFactory as shown in the SurveyCreatorComponent.jsx file.
    In Angular, register the component in AngularComponentFactory as shown in the survey-templates-tab.component.ts file.
    In Vue and Knockout, use techniques native to these libraries:

  3. Configure a tab plugin.
    A tab plugin is an object that allows you to handle user interactions with a tab. The tab plugin object must specify the activate and deactivate functions. They are executed when users switch to or from the tab and allow you to handle and cancel the switch if necessary. In this demo, activate is empty, and deactivate always returns true, which means that they do not interfere with user interactions in any way.

  4. Register a custom tab.
    Call the addPluginTab() method on a SurveyCreatorModel instance to register a custom tab.

Your cookie settings

We use cookies on our site to make your browsing experience more convenient and personal. In some cases, they are essential to making the site work properly. By clicking "Accept All", you consent to the use of all cookies in accordance with our Terms of Use & Privacy Statement. However, you may visit "Cookie settings" to provide a controlled consent.

Your renewal subscription expires soon.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.

Your renewal subscription has expired.

Since the license is perpetual, you will still have permanent access to the product versions released within the first 12 month of the original purchase date.

If you wish to continue receiving technical support from our Help Desk specialists and maintain access to the latest product updates, make sure to renew your subscription by clicking the "Renew" button below.