Create a Split Button Dropdown with Bootstrap
📖 Scenario: You are building a simple web page that includes a split button dropdown. This type of button has a main action on the left and a dropdown menu on the right. It is commonly used for actions with extra options.
🎯 Goal: Build a split button dropdown using Bootstrap 5. The button should have a main button labeled Action and a dropdown toggle with three menu items: Option 1, Option 2, and Option 3.
📋 What You'll Learn
Use Bootstrap 5 classes for styling and dropdown functionality
Create a split button with a main button and a dropdown toggle button
Include three dropdown menu items with the exact text: Option 1, Option 2, Option 3
Ensure the dropdown is accessible with proper aria attributes
Use semantic HTML and include the necessary Bootstrap data attributes
💡 Why This Matters
🌍 Real World
Split button dropdowns are common in web apps and websites where a main action has related options. For example, a 'Save' button with different save options.
💼 Career
Knowing how to build accessible, interactive UI components with Bootstrap is valuable for front-end web development roles.
Progress0 / 4 steps