Bootstrap MCQs – Bootstrap with JavaScript Frameworks

11.) Which command installs Bootstrap-Vue in a Vue.js project?

A) vue add bootstrap
B) npm install bootstrap-vue
C) install bootstrap vue
D) bootstrap add vue

Answer: Option B

Explanation: To use Bootstrap components in a Vue.js project, you install bootstrap-vue using npm install bootstrap-vue.

12.) What method toggles a modal in React Bootstrap?

A) showModal()
B) openModal()
C) setShow(true)
D) toggleModal()

Answer: Option C

Explanation: In React Bootstrap, modals are toggled using state hooks and setShow(true).

13.) What does “ng-bootstrap” provide?

A) Bootstrap for Angular
B) Bootstrap for React
C) Bootstrap for Vue
D) Bootstrap for Node.js

Answer: Option A

Explanation: ng-bootstrap provides Bootstrap components without jQuery dependency, optimized for Angular applications.

14.) How do you install Bootstrap in a Vue.js project?

A) npm install bootstrap-vue
B) vue install bootstrap
C) bootstrap-vue install
D) npm add bootstrap-vue

Answer: Option A

Explanation: To use Bootstrap components in Vue, install bootstrap-vue using npm.

15.) What must be added to enable Bootstrap tooltips in React?

A) require(‘bootstrap-tooltips’)
B) enableTooltips();
C) addBootstrapTooltips();
D) import ‘bootstrap/dist/js/bootstrap.bundle.min.js’

Answer: Option D

Explanation: Bootstrap tooltips rely on JavaScript utilities, so you need to import Bootstrap JS to activate them in a React project.

16.) Which Bootstrap framework is best for Vue.js?

A) bootstrap-vue
B) vue-bootstrap
C) ng-bootstrap
D) react-bootstrap

Answer: Option A

Explanation: bootstrap-vue provides Vue-specific Bootstrap components without requiring direct Bootstrap CSS imports.

17.) Which Bootstrap-Vue directive initializes tooltips?

A) b-tooltip
B) v-b-tooltip
C) tooltip-init
D) vue-tooltip

Answer: Option B

Explanation: The v-b-tooltip directive enables Bootstrap tooltips in Vue applications.

18.) Which Bootstrap version first removed jQuery dependency?

A) Bootstrap 3
B) Bootstrap 4
C) Bootstrap 5
D) Bootstrap 6

Answer: Option C

Explanation: Bootstrap 5 removed jQuery dependency, making it easier to integrate with modern JavaScript frameworks.

19.) What package provides Bootstrap utilities in Next.js?

A) bootstrap
B) bootstrap-utils
C) bootstrap-next
D) bootstrapjs

Answer: Option A

Explanation: Installing Bootstrap using npm and importing it in _app.js provides Bootstrap utilities in Next.js projects.

20.) Which directive applies Bootstrap popovers in Vue?

A) v-b-popover
B) vue-popover
C) b-popover
D) v-popover

Answer: Option A

Explanation: The v-b-popover directive initializes Bootstrap popovers in Bootstrap-Vue.

Leave a Reply

Your email address will not be published. Required fields are marked *