---
title: Bootstrap Theme Adapter
product: Form Library
description: Style SurveyJS forms with Bootstrap using the Theme Adapter. Make form controls inherit Bootstrap styles without maintaining custom CSS overrides.
framework: Vanilla JS
source: https://surveyjs.io/form-library/examples/bootstrap-theme-adapter/vanillajs
index: https://surveyjs.io/form-library/examples/overview.md
---

# Bootstrap Theme Adapter (Vanilla JS)

## Files

### `public/index.html`

```html
<div id="surveyElement" style="position: absolute; top: 0; left: 0; right: 0; bottom: 0; min-height: 100%; height:100%"></div>
```

### `src/index.css`

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

### `src/index.js`

```js
import { Model } from "survey-core";
import "survey-js-ui";
import "survey-core/survey-core.min.css";
import "./index.css";
import { json } from "./json";

const survey = new Model(json);
survey.onComplete.add((sender, options) => {
    console.log(JSON.stringify(sender.data, null, 3));
});

survey.render(document.getElementById("surveyElement"));
```

### `src/json.js`

```js
export const json = {};
```

### `src/theme.js`

```js
export const themeJson = {};
```

### `package.json`

```json
{
  "dependencies": {
    "survey-core": "latest",
    "survey-js-ui": "latest"
  }
}
```

## Other Frameworks

- [Angular](https://surveyjs.io/form-library/examples/bootstrap-theme-adapter/angular.md)
- [React](https://surveyjs.io/form-library/examples/bootstrap-theme-adapter/reactjs.md)
- [Vue 3](https://surveyjs.io/form-library/examples/bootstrap-theme-adapter/vue3js.md)
- [jQuery](https://surveyjs.io/form-library/examples/bootstrap-theme-adapter/jquery.md)
