Importing only needed components means your website loads less CSS and JavaScript. This makes pages load faster and improves user experience.
Bootstrap's JavaScript components can be imported individually from 'bootstrap/js/dist/'. For the Button component, the correct import is import 'bootstrap/js/dist/button';.
Importing only the Modal CSS applies styles, so the modal looks correct. But without the JavaScript, the modal cannot open or close properly because the behavior depends on JS.
Bootstrap alerts use the class alert. Using .alert targets all alert components. Option C targets only alerts with the alert-primary variant, which is more specific but not all alerts.
Bootstrap's JavaScript adds keyboard support and ARIA roles for interactive components. If you import only CSS or partial JS, you must manually add ARIA roles and keyboard handlers to keep accessibility.
