SurveyJS theme adapter for Bootstrap 5.3 — live demo and source #43236
ElenaGorbatkova
started this conversation in
Show & Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone! I'm part of the SurveyJS team, and I'd like to share our theme adapter for Bootstrap 5.3.
SurveyJS Form Library renders forms from JSON definitions, including multi-step forms, conditional fields, validation, and repeatable sections. We built the Bootstrap adapter to make those forms follow the visual style of an existing Bootstrap application.
How it works
The adapter maps SurveyJS design tokens to Bootstrap CSS variables, so forms inherit the host application's colors, typography, borders, and other supported styles. It also follows Bootstrap 5.3 light and dark color modes.
In an application that already loads Bootstrap, setting up the adapter looks like this:
Matching adapters are also available for these Bootswatch themes: Cosmo, Darkly, Flatly, Litera, Lux, Morph, and Zephyr. Import the one adapter stylesheet that matches your application’s theme, such as
bootstrap-flatly.css.SurveyJS still renders its own components and markup. The adapter connects their styling to Bootstrap but doesn’t replace them with native Bootstrap controls. Custom layouts or components that add styling beyond Bootstrap’s standard variables may need additional overrides.
Try it
The demo shows a patient-intake form built with SurveyJS next to the same form built with native Bootstrap controls, so you can compare their appearance and behavior.
Licensing
SurveyJS Form Library is free and open source under the MIT license. Survey Creator, the optional embeddable drag-and-drop form builder shown in the demo, requires a commercial developer license for production use.
We'd appreciate feedback on the Bootstrap integration, particularly:
If you spot something, a screenshot and the Bootstrap or Bootswatch theme you're using would help us investigate. Thanks!
All reactions