---
title: Survey Creator Toolbox Customization
product: Survey Creator
description: Easily customize toolbox elements of your Survey builder - add custom question types, rename or remove default question types, and change their icons. View a free demo example for JavaScript to learn more.
framework: Vue 3
source: https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/vue3js
index: https://surveyjs.io/survey-creator/examples/overview.md
---

# Survey Creator Toolbox Customization (Vue 3)

The Toolbox contains available question and panel types. Click one of these survey elements or drag and drop it onto the design surface to add the element to the survey. This demo shows how to customize the Toolbox and its items.

## Full and Compact Modes

The Toolbox supports full and compact modes. In compact mode, element names are hidden and become visible only when users move the mouse pointer over the element icon.

The Toolbox switches between the modes automatically based on the width of Survey Creator. Specify the [`forceCompact`](https://surveyjs.io/Documentation/Survey-Creator?id=questiontoolbox#forceCompact) property if you want the Toolbox to always use a specific mode. This demo disables the `forceCompact` property to always show the Toolbox in full mode.

## Limit Available Question and Panel Types

All available question and panel types are listed in the [`getType()`](https://surveyjs.io/Documentation/Library?id=Question#getType) method description. If you need to show only a part of these types, specify them in the Survey Creator's [`questionTypes`](https://surveyjs.io/Documentation/Survey-Creator?id=ICreatorOptions#questionTypes) array. In this demo, the array limits available question types to [Text](https://surveyjs.io/Examples/Library?id=questiontype-text), [Checkbox](https://surveyjs.io/Examples/Library?id=questiontype-checkbox), [Radiogroup](https://surveyjs.io/Examples/Library?id=questiontype-radiogroup), and [Dropdown](https://surveyjs.io/Examples/Library?id=questiontype-dropdown).

## Customize Predefined Toolbox Items

To customize a predefined Toolbox item, pass its [type](https://surveyjs.io/Documentation/Library?id=Question#getType) as an argument to the [`getItemByName(itemName)`](https://surveyjs.io/Documentation/Survey-Creator?id=questiontoolbox#getItemByName) method. This method returns the item's configuration object. Change the [properties of this object](https://surveyjs.io/Documentation/Survey-Creator?id=iquestiontoolboxitem) to customize the Toolbox item. For example, this demo shows how to change the [`title`](https://surveyjs.io/Documentation/Survey-Creator?id=iquestiontoolboxitem#title) for the Text question, the [`iconName`](https://surveyjs.io/Documentation/Survey-Creator?id=iquestiontoolboxitem#iconName) for the Checkbox question, and the [`json`](https://surveyjs.io/Documentation/Survey-Creator?id=iquestiontoolboxitem#json) schema for multiple questions.

## Add a Custom Toolbox Item

Since the Toolbox is meant to contain question and panel types, to add a new element, you need to create a custom question or panel type. Refer to the following help topic for detailed instructions:

- [Create Specialized Question Types](https://surveyjs.io/form-library/documentation/customize-question-types/create-specialized-question-types)
- [Create Composite Question Types](https://surveyjs.io/form-library/documentation/customize-question-types/create-composite-question-types)
- [Integrate Third-Party Angular Components](https://surveyjs.io/form-library/documentation/customize-question-types/third-party-component-integration-angular)
- [Integrate Third-Party React Components](https://surveyjs.io/form-library/documentation/customize-question-types/third-party-component-integration-react)
- [Integrate Third-Party Vue 3 Components](/form-library/documentation/customize-question-types/third-party-component-integration-vue)

## Files

### `public/index.html`

```html
<div id="app" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0;"></div>
```

### `src/App.vue`

```html
<template>
    <SurveyCreatorComponent :model="creator" />
</template>
<script setup lang="ts">
    import { SurveyCreatorModel } from "survey-creator-core";
    import { SurveyCreatorComponent } from "survey-creator-vue";
    import "survey-core/survey.i18n";
    import "survey-creator-core/survey-creator-core.i18n";
    import "survey-core/survey-core.css";
    import "survey-creator-core/survey-creator-core.css";
    import "./index.css";
    import SurveyTheme from "survey-core/themes";
    import { registerCreatorTheme } from "survey-creator-core";

    registerCreatorTheme(SurveyTheme); // Add predefined Survey Creator UI themes

    const creator = new SurveyCreatorModel({ questionTypes: [ "text", "checkbox", "radiogroup", "dropdown" ] });
    const toolbox = creator.toolbox;
    // Disable the compact display mode
    toolbox.forceCompact = false;
    // Change the title of the Text question type
    toolbox.getItemByName("text").title = "Single-Line Text";
    // Change the icon of the Checkbox question type
    toolbox.getItemByName("checkbox").iconName = "icon-check-16x16";
    
    // Specify new default choices
    const newDefaultChoices = [
      { text: "Option 1", value: 1 },
      { text: "Option 2", value: 2 },
      { text: "Option 3", value: 3 } 
    ];
    
    // Apply the default choices to the Checkbox, Radiogroup, and Dropdown question types
    toolbox.getItemByName("checkbox").json.choices = newDefaultChoices;
    toolbox.getItemByName("radiogroup").json.choices = newDefaultChoices;
    toolbox.getItemByName("dropdown").json.choices = newDefaultChoices;
    
    // Do not categorize toolbox items since there are only four of them
    toolbox.removeCategories();
    
</script>
```

### `src/index.css`

```css
/* You can add your custom CSS here. */
```

### `src/main.ts`

```ts
import { createApp } from "vue";
import App from "./App.vue";

const app = createApp(App);
app.mount("#app");
```

### `src/shims-vue.d.ts`

```ts
/* eslint-disable */
declare module "*.vue" {
    import type { DefineComponent } from "vue"
    const component: DefineComponent<{}, {}, any>
    export default component
}
```

### `.eslintrc.js`

```js
module.exports = {
    root: true,
    env: {
        node: true
    },
    extends: [
        "plugin:vue/vue3-essential",
        "eslint:recommended",
        "@vue/typescript/recommended",
        "@vue/prettier",
        "@vue/prettier/@typescript-eslint"
    ],
    parserOptions: {
        ecmaVersion: 2020
    },
    rules: {
        "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
        "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
    },
    overrides: [
        {
            files: [
                "**/__tests__/*.{j,t}s?(x)",
                "**/tests/unit/**/*.spec.{j,t}s?(x)"
            ],
            env: {
                jest: true
            }
        }
    ]
};
```

### `babel.config.js`

```js
module.exports = {
  presets: ["@vue/cli-plugin-babel/preset"]
};
```

### `package.json`

```json
{
  "name": "surveyjs-library-vue3",
  "version": "0.1.0",
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint"
  },
  "dependencies": {
    "core-js": "^3.6.5",
    "tslib": "2.6.1",
    "vue": "^3.4.1",
    "survey-core": "latest",
    "survey-vue3-ui": "latest",
    "survey-creator-core": "latest",
    "survey-creator-vue": "latest",
    "vue-router": "^4.0.0-0",
    "vuex": "^4.0.0-0"
  },
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.33.0",
    "@typescript-eslint/parser": "^2.33.0",
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-plugin-pwa": "~4.5.0",
    "@vue/cli-plugin-router": "~4.5.0",
    "@vue/cli-plugin-typescript": "~4.5.0",
    "@vue/cli-plugin-vuex": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-prettier": "^6.0.0",
    "@vue/eslint-config-typescript": "^5.0.2",
    "@vue/test-utils": "^2.0.0-0",
    "eslint": "^6.7.2",
    "eslint-plugin-prettier": "^3.1.3",
    "eslint-plugin-vue": "^7.0.0-0",
    "node-sass": "^4.12.0",
    "prettier": "^1.19.1",
    "sass-loader": "^8.0.2",
    "typescript": "~3.9.3"
  }
}
```

### `tsconfig.json`

```json
{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "skipLibCheck": true,
    "esModuleInterop": true,
    "allowSyntheticDefaultImports": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "webpack-env",
      "jest"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "esnext",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/angular.md)
- [React](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/reactjs.md)
- [jQuery](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/jquery.md)
- [Vanilla JS](https://surveyjs.io/survey-creator/examples/survey-toolbox-customization/vanillajs.md)
